From patchwork Wed Aug 12 10:29:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52338 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id DE15922ED0 for ; Wed, 12 Aug 2015 10:31:11 +0000 (UTC) Received: by lbcje9 with SMTP id je9sf4261356lbc.3 for ; Wed, 12 Aug 2015 03:31:11 -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=txVTvJGN1Gksne5nh2c/CizrhqaD+hXfHqk6g7AnA6o=; b=Vnd8JLBWvzMELH156om3K4JNhREJu8JeSOh9alEuz0rn2bIEgFwcTRbQ4TfEN6x8K5 eQGDtv0IEbaJwKrTYwP2eb0omZUCPosj5F8rxL0HjYuqGsVeOJMq8mhkm8pSzEB4D1Ij zBgaluBXXiWpBcEkWk9ksty16uKMRijTgw+iVfCN6dPO+pNulCTnK4Ci3mH1UfCP7OCR jGqq9nJg3r+hysZCqxQLI3cuDXade2EDQVitaACrqEnyg9RsUeHSDrvkVWQdFM7R77PM fKCO8MTPYnxKZdUvCHDY4LnmzXJ1HAMco51vvoQmsmAiNGgwFsglKCDt2dsEDdZqE9Vs ghSw== X-Gm-Message-State: ALoCoQlV/ozprh0VLdbJpJss742XP/SJY9qS1xSdiJ8Hp1KXpzXnic36aRTM3R1g7WE1SxTHDo30 X-Received: by 10.112.160.39 with SMTP id xh7mr9362116lbb.22.1439375470948; Wed, 12 Aug 2015 03:31:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.146 with SMTP id j18ls28778laa.44.gmail; Wed, 12 Aug 2015 03:31:10 -0700 (PDT) X-Received: by 10.152.42.244 with SMTP id r20mr31503928lal.90.1439375470387; Wed, 12 Aug 2015 03:31:10 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id bx11si3797250lbb.141.2015.08.12.03.31.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 03:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbpu9 with SMTP id pu9so6919661lbb.3 for ; Wed, 12 Aug 2015 03:31:10 -0700 (PDT) X-Received: by 10.152.170.230 with SMTP id ap6mr14804155lac.73.1439375470260; Wed, 12 Aug 2015 03:31:10 -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 l6csp234808lba; Wed, 12 Aug 2015 03:31:08 -0700 (PDT) X-Received: by 10.68.211.42 with SMTP id mz10mr66710570pbc.118.1439375468152; Wed, 12 Aug 2015 03:31:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id os4si8800834pdb.155.2015.08.12.03.31.07; Wed, 12 Aug 2015 03:31:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S934382AbbHLKbD (ORCPT + 28 others); Wed, 12 Aug 2015 06:31:03 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35727 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934334AbbHLKa5 (ORCPT ); Wed, 12 Aug 2015 06:30:57 -0400 Received: by pacgr6 with SMTP id gr6so11904607pac.2 for ; Wed, 12 Aug 2015 03:30:56 -0700 (PDT) X-Received: by 10.68.197.231 with SMTP id ix7mr9692290pbc.85.1439375456805; Wed, 12 Aug 2015 03:30:56 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id bf14sm5918420pdb.28.2015.08.12.03.30.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Aug 2015 03:30:56 -0700 (PDT) From: Viresh Kumar To: trivial@kernel.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Neil Horman , "David S. Miller" , dev@openvswitch.org (open list:OPENVSWITCH), linux-sctp@vger.kernel.org (open list:SCTP PROTOCOL), netdev@vger.kernel.org (open list:OPENVSWITCH), Pravin Shelar , Vlad Yasevich Subject: [PATCH V1 Resend 10/10] net: Drop unlikely before IS_ERR(_OR_NULL) Date: Wed, 12 Aug 2015 15:59:47 +0530 Message-Id: <173f4a88f99d366f195e253b940d31555b7a30b0.1439375087.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.217.176 as permitted sender) smtp.mailfrom=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. Acked-by: Neil Horman 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 ffe984f5b95c..a515e338cade 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 17bef01b9aa3..897c01c029ca 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4475,7 +4475,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);