From patchwork Fri Jul 31 08:38:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51760 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 AA37022A8D for ; Fri, 31 Jul 2015 08:43:01 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf21890453lbc.0 for ; Fri, 31 Jul 2015 01:43:00 -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=yIEWphnqVxfjVSzpSvj2QZPnVkdLz/7bpdlR28xwONQ=; b=NkGdMonUebNSqYrdE9UReJDyzJYEWl4Dpy2S53mhFtdjUqaQFmTRIlFcsvpuRrIue+ DRATEG8SNAz0ksGCYDHCfqKaXFWyOXALHZjaxfe6fqGXIPIv83/uYjyC+QBrr4gTU+MK CIswf45sFJkWZD75wkItHDRV1jZHGvB/kjt8j+Xg+WQuDjzEh6ywfR9aeQbFsf3+qDnX AZPyeil6wiAwKl1BAYMUKzikFH5Tl5TCqpeTNFU3t2pXXE7Bv+qfTxtwlMX/mea3bAkd z2FTNDrXXm1j3lrHI7GPa9WI740ZlvadTVwxpxtcd/4//2xKrKPNqRfgm1vOu6fmcEh4 MJvw== X-Gm-Message-State: ALoCoQmnwLdUJV8ioYz9zEobzOADKqHMtfAutvjBDnDGHzUtgtsCq+HOOejXOnmefly9c/z1bYSd X-Received: by 10.180.205.198 with SMTP id li6mr705107wic.5.1438332180333; Fri, 31 Jul 2015 01:43:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.7 with SMTP id u7ls231468laj.105.gmail; Fri, 31 Jul 2015 01:43:00 -0700 (PDT) X-Received: by 10.152.28.73 with SMTP id z9mr1591255lag.93.1438332180135; Fri, 31 Jul 2015 01:43:00 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id ja8si3010734lbc.57.2015.07.31.01.43.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 01:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lblf12 with SMTP id f12so42204784lbl.2 for ; Fri, 31 Jul 2015 01:43:00 -0700 (PDT) X-Received: by 10.152.207.76 with SMTP id lu12mr1589022lac.29.1438332180028; Fri, 31 Jul 2015 01:43:00 -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 l6csp229150lba; Fri, 31 Jul 2015 01:42:58 -0700 (PDT) X-Received: by 10.66.55.66 with SMTP id q2mr4526721pap.94.1438332177936; Fri, 31 Jul 2015 01:42:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rt15si8687833pab.240.2015.07.31.01.42.56; Fri, 31 Jul 2015 01:42:57 -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 S1753269AbbGaIkz (ORCPT + 28 others); Fri, 31 Jul 2015 04:40:55 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34523 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753223AbbGaIkr (ORCPT ); Fri, 31 Jul 2015 04:40:47 -0400 Received: by pacan13 with SMTP id an13so38246766pac.1 for ; Fri, 31 Jul 2015 01:40:46 -0700 (PDT) X-Received: by 10.67.14.163 with SMTP id fh3mr4441803pad.155.1438332046654; Fri, 31 Jul 2015 01:40:46 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id wp5sm6278585pab.22.2015.07.31.01.40.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 01:40:46 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Alexander Viro , Andreas Dilger , Anna Schumaker , Boaz Harrosh , Christoph Hellwig , David Howells , ecryptfs@vger.kernel.org (open list:ECRYPT FILE SYSTEM), "Eric W. Biederman" , Fabian Frederick , Joe Perches , linux-cifs@vger.kernel.org (open list:COMMON INTERNET FILE SYSTEM (CIFS)), linux-ext4@vger.kernel.org (open list:EXT4 FILE SYSTEM), linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)), linux-nfs@vger.kernel.org (open list:NFS, SUNRPC, AND LOCKD CLIENTS), Peng Tao , Petr Vandrovec , samba-technical@lists.samba.org (moderated list:COMMON INTERNET FILE SYSTEM (CIFS)), Steve French , "Theodore Ts'o" , Tom Haynes , Trond Myklebust , Tyler Hicks , Weston Andros Adamson Subject: [PATCH 12/15] fs: Drop unlikely before IS_ERR(_OR_NULL) Date: Fri, 31 Jul 2015 14:08:32 +0530 Message-Id: <4fd8dd8ed76901a89d6cd17e50ac585ea929f1fb.1438331416.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.182 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 --- fs/cifs/readdir.c | 2 +- fs/ecryptfs/inode.c | 2 +- fs/ext4/extents.c | 6 +++--- fs/ext4/namei.c | 2 +- fs/namei.c | 4 ++-- fs/ncpfs/dir.c | 2 +- fs/nfs/objlayout/objio_osd.c | 2 +- fs/proc/proc_sysctl.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index b1eede3678a9..0557c45e9c33 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -84,7 +84,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); dentry = d_hash_and_lookup(parent, name); - if (unlikely(IS_ERR(dentry))) + if (IS_ERR(dentry)) return; if (dentry) { diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 3c4db1172d22..e2e47ba5d313 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -270,7 +270,7 @@ ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, ecryptfs_inode = ecryptfs_do_create(directory_inode, ecryptfs_dentry, mode); - if (unlikely(IS_ERR(ecryptfs_inode))) { + if (IS_ERR(ecryptfs_inode)) { ecryptfs_printk(KERN_WARNING, "Failed to create file in" "lower filesystem\n"); rc = PTR_ERR(ecryptfs_inode); diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 2553aa8b608d..799f01714767 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -899,7 +899,7 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block, bh = read_extent_tree_block(inode, path[ppos].p_block, --i, flags); - if (unlikely(IS_ERR(bh))) { + if (IS_ERR(bh)) { ret = PTR_ERR(bh); goto err; } @@ -5792,7 +5792,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1, int split = 0; path1 = ext4_find_extent(inode1, lblk1, NULL, EXT4_EX_NOCACHE); - if (unlikely(IS_ERR(path1))) { + if (IS_ERR(path1)) { *erp = PTR_ERR(path1); path1 = NULL; finish: @@ -5800,7 +5800,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1, goto repeat; } path2 = ext4_find_extent(inode2, lblk2, NULL, EXT4_EX_NOCACHE); - if (unlikely(IS_ERR(path2))) { + if (IS_ERR(path2)) { *erp = PTR_ERR(path2); path2 = NULL; goto finish; diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 011dcfb5cce3..0554e4be1fb8 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1429,7 +1429,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir, } num++; bh = ext4_getblk(NULL, dir, b++, 0); - if (unlikely(IS_ERR(bh))) { + if (IS_ERR(bh)) { if (ra_max == 0) { ret = bh; goto cleanup_and_exit; diff --git a/fs/namei.c b/fs/namei.c index ae4e4c18b2ac..04fdec230c45 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1942,7 +1942,7 @@ static int link_path_walk(const char *name, struct nameidata *nd) if (err) { const char *s = get_link(nd); - if (unlikely(IS_ERR(s))) + if (IS_ERR(s)) return PTR_ERR(s); err = 0; if (unlikely(!s)) { @@ -3351,7 +3351,7 @@ struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt, return ERR_PTR(-ELOOP); filename = getname_kernel(name); - if (unlikely(IS_ERR(filename))) + if (IS_ERR(filename)) return ERR_CAST(filename); set_nameidata(&nd, -1, filename); diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 93575e91a7aa..356816e7bc90 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -597,7 +597,7 @@ ncp_fill_cache(struct file *file, struct dir_context *ctx, qname.name = __name; newdent = d_hash_and_lookup(dentry, &qname); - if (unlikely(IS_ERR(newdent))) + if (IS_ERR(newdent)) goto end_advance; if (!newdent) { newdent = d_alloc(dentry, &qname); diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index 5aaed363556a..5c0c6b58157f 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -124,7 +124,7 @@ objio_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev, retry_lookup: od = osduld_info_lookup(&odi); - if (unlikely(IS_ERR(od))) { + if (IS_ERR(od)) { err = PTR_ERR(od); dprintk("%s: osduld_info_lookup => %d\n", __func__, err); if (err == -ENODEV && retry_flag) { diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index fdda62e6115e..fe5b6e6c4671 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -948,7 +948,7 @@ static struct ctl_dir *get_subdir(struct ctl_dir *dir, found: subdir->header.nreg++; failed: - if (unlikely(IS_ERR(subdir))) { + if (IS_ERR(subdir)) { pr_err("sysctl could not get directory: "); sysctl_print_dir(dir); pr_cont("/%*.*s %ld\n",