From patchwork Fri Jul 31 08:38:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51759 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id EA45922A8D for ; Fri, 31 Jul 2015 08:41:19 +0000 (UTC) Received: by lafd3 with SMTP id d3sf21834980laf.1 for ; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=a6suL2+qZ1RjGQvVtztDvCUnBfjgOAiEIWTSgHCCrj0=; b=PYu5tGXmI1+IbQ7aIorGU7+5RX/C9+KYSJLrlIlGD5pZOPip/uklt21VXMEKkOnNww NdxIRJrpja2AEBTzepTkO1iyIZAedA2t08jowHJe5w7F/dtmtJ4LopACZJPq+tZTpRsS 0Pgex4DzMajSbV9hirjv+YvTAF2BlcxZVLl3kFOvLd6UwKjy/uJVskwhQMQTl55ylMK9 U7JtHpb9GUQIm33s8vEgJbnvxj1ZxdL+dd/Mh94JrgZ8l8obV1OxGpk8Eg4gk2ZKQIZw ipe+c67+YLuXbIjC6eCTIuOSZPbad9DI+bGOchLH1P0QZNcdW/hm3IZtjSdFQ81Yvi1x mn1Q== X-Gm-Message-State: ALoCoQkAO+MHyJuKhuO26rTVd9tIZCEhDqcO+SQieWbyu8Wn9x2Nq/L6Knhxu5D5YP3EQbHJySU+ X-Received: by 10.194.5.229 with SMTP id v5mr594342wjv.0.1438332078539; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.1 with SMTP id h1ls257381lag.36.gmail; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) X-Received: by 10.152.28.73 with SMTP id z9mr1584510lag.93.1438332078210; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id e10si2984022lam.131.2015.07.31.01.41.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 01:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lafd3 with SMTP id d3so39819604laf.1 for ; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr1606000lbc.19.1438332078073; Fri, 31 Jul 2015 01:41:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp228174lba; Fri, 31 Jul 2015 01:41:16 -0700 (PDT) X-Received: by 10.66.63.8 with SMTP id c8mr4608790pas.122.1438332076011; Fri, 31 Jul 2015 01:41:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lh16si8688905pab.220.2015.07.31.01.41.15; Fri, 31 Jul 2015 01:41:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753374AbbGaIlG (ORCPT + 4 others); Fri, 31 Jul 2015 04:41:06 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:34153 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334AbbGaIlB (ORCPT ); Fri, 31 Jul 2015 04:41:01 -0400 Received: by pdbbh15 with SMTP id bh15so38979174pdb.1 for ; Fri, 31 Jul 2015 01:41:01 -0700 (PDT) X-Received: by 10.70.134.198 with SMTP id pm6mr4524776pdb.17.1438332060951; Fri, 31 Jul 2015 01:41:00 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id v8sm6215513pdm.89.2015.07.31.01.40.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 01:41:00 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , "David S. Miller" , dev@openvswitch.org (open list:OPENVSWITCH), linux-sctp@vger.kernel.org (open list:SCTP PROTOCOL), Neil Horman , netdev@vger.kernel.org (open list:OPENVSWITCH), Pravin Shelar , Vlad Yasevich Subject: [PATCH 15/15] net: Drop unlikely before IS_ERR(_OR_NULL) Date: Fri, 31 Jul 2015 14:08:35 +0530 Message-Id: <88a6d5b3eb1579a29ed896d7fd6e58c94663d3ac.1438331416.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: netdev@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Signed-off-by: Viresh Kumar --- net/openvswitch/datapath.c | 2 +- net/sctp/socket.c | 2 +- net/socket.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index ff8c4a4c1609..01d69680ba5d 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1143,7 +1143,7 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info) info, OVS_FLOW_CMD_NEW, false, ufid_flags); - if (unlikely(IS_ERR(reply))) { + if (IS_ERR(reply)) { error = PTR_ERR(reply); goto err_unlock_ovs; } diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 1425ec2bbd5a..c1569432235e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4481,7 +4481,7 @@ static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval } newfile = sock_alloc_file(newsock, 0, NULL); - if (unlikely(IS_ERR(newfile))) { + if (IS_ERR(newfile)) { put_unused_fd(retval); sock_release(newsock); return PTR_ERR(newfile); diff --git a/net/socket.c b/net/socket.c index 9963a0b53a64..dd2c247c99e3 100644 --- a/net/socket.c +++ b/net/socket.c @@ -373,7 +373,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) file = alloc_file(&path, FMODE_READ | FMODE_WRITE, &socket_file_ops); - if (unlikely(IS_ERR(file))) { + if (IS_ERR(file)) { /* drop dentry, keep inode */ ihold(d_inode(path.dentry)); path_put(&path); @@ -1303,7 +1303,7 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol, } newfile1 = sock_alloc_file(sock1, flags, NULL); - if (unlikely(IS_ERR(newfile1))) { + if (IS_ERR(newfile1)) { err = PTR_ERR(newfile1); goto out_put_unused_both; } @@ -1467,7 +1467,7 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, goto out_put; } newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name); - if (unlikely(IS_ERR(newfile))) { + if (IS_ERR(newfile)) { err = PTR_ERR(newfile); put_unused_fd(newfd); sock_release(newsock);