From patchwork Fri Jul 31 08:38:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51752 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 0B74522A8D for ; Fri, 31 Jul 2015 08:39:57 +0000 (UTC) Received: by wibdx1 with SMTP id dx1sf3912340wib.2 for ; Fri, 31 Jul 2015 01:39:56 -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=e5X2aLnx9S8hjCOSebY63MBkq7+eRAjbNBupl0tw/RM=; b=NjbibWq98DBRknUZ9gGMwJRkVBsOy1z4FgKbmH+R2AUQ2cOvwi0fVWirMOVnTZErWv 9QlIQ7iWC0rMPFmSmGafxmlgeMyAveodrVr2Qu1UnP5EkdO5cBNgyjmAE5Y4EnJYIf+O G/+MeViNArPuLolEVOXkG4k7j/poHcYCjR7S+RVg5ct2Ntg3eiXGQiKedmdq/LLV3Q1b ARqb3Z/oVPl6azfZjy/Syoa09JemQFr1sE9ZGVVSunqLbLIElLFGztsCSk3f4X3ah8j9 1+eEFjSbqppGPglneJ5lJ96Y9SDK4/8D9FJKVmXE6/fRZo8M/HoLQHGfYu+nsIyLnfmO aV+A== X-Gm-Message-State: ALoCoQny1YpkC77CKS/WVKPcXJAHaA7Vmb2yeUG43Bw+5uQm/Q66c6Y+nsiqFiAQH1rBO3FZ062Y X-Received: by 10.152.1.105 with SMTP id 9mr571825lal.3.1438331996276; Fri, 31 Jul 2015 01:39:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.100 with SMTP id j4ls288983lah.9.gmail; Fri, 31 Jul 2015 01:39:55 -0700 (PDT) X-Received: by 10.152.42.244 with SMTP id r20mr1594723lal.90.1438331995641; Fri, 31 Jul 2015 01:39:55 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id g1si2998969lab.70.2015.07.31.01.39.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 01:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labiq1 with SMTP id iq1so5068971lab.3 for ; Fri, 31 Jul 2015 01:39:55 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr1600639lbc.19.1438331995420; Fri, 31 Jul 2015 01:39:55 -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 l6csp227458lba; Fri, 31 Jul 2015 01:39:54 -0700 (PDT) X-Received: by 10.70.23.98 with SMTP id l2mr4563726pdf.74.1438331993366; Fri, 31 Jul 2015 01:39:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si8822753pap.63.2015.07.31.01.39.51; Fri, 31 Jul 2015 01:39:53 -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 S1753079AbbGaIji (ORCPT + 28 others); Fri, 31 Jul 2015 04:39:38 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:33770 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752958AbbGaIja (ORCPT ); Fri, 31 Jul 2015 04:39:30 -0400 Received: by pdbnt7 with SMTP id nt7so39117564pdb.0 for ; Fri, 31 Jul 2015 01:39:30 -0700 (PDT) X-Received: by 10.70.23.196 with SMTP id o4mr4480375pdf.164.1438331969996; Fri, 31 Jul 2015 01:39:29 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id nl10sm6266401pdb.38.2015.07.31.01.39.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 01:39:29 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Alasdair Kergon , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT), Mike Snitzer , Neil Brown Subject: [PATCH 06/15] drivers: md: Drop unlikely before IS_ERR(_OR_NULL) Date: Fri, 31 Jul 2015 14:08:26 +0530 Message-Id: <93a74cd75c841f6b1ed176fe6fa71367ca64eb69.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.215.44 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 --- drivers/md/dm-snap-persistent.c | 2 +- drivers/md/dm-verity.c | 2 +- drivers/md/persistent-data/dm-block-manager.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 808b8419bc48..bf71583296f7 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -533,7 +533,7 @@ static int read_exceptions(struct pstore *ps, chunk = area_location(ps, ps->current_area); area = dm_bufio_read(client, chunk, &bp); - if (unlikely(IS_ERR(area))) { + if (IS_ERR(area)) { r = PTR_ERR(area); goto ret_destroy_bufio; } diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c index bb9c6a00e4b0..1d131519ed21 100644 --- a/drivers/md/dm-verity.c +++ b/drivers/md/dm-verity.c @@ -271,7 +271,7 @@ static int verity_verify_level(struct dm_verity_io *io, sector_t block, verity_hash_at_level(v, block, level, &hash_block, &offset); data = dm_bufio_read(v->bufio, hash_block, &buf); - if (unlikely(IS_ERR(data))) + if (IS_ERR(data)) return PTR_ERR(data); aux = dm_bufio_get_aux_data(buf); diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index 4d6c9b689eaa..88dbe7b97c2c 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c @@ -454,7 +454,7 @@ int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, int r; p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result); - if (unlikely(IS_ERR(p))) + if (IS_ERR(p)) return PTR_ERR(p); aux = dm_bufio_get_aux_data(to_buffer(*result)); @@ -490,7 +490,7 @@ int dm_bm_write_lock(struct dm_block_manager *bm, return -EPERM; p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result); - if (unlikely(IS_ERR(p))) + if (IS_ERR(p)) return PTR_ERR(p); aux = dm_bufio_get_aux_data(to_buffer(*result)); @@ -523,7 +523,7 @@ int dm_bm_read_try_lock(struct dm_block_manager *bm, int r; p = dm_bufio_get(bm->bufio, b, (struct dm_buffer **) result); - if (unlikely(IS_ERR(p))) + if (IS_ERR(p)) return PTR_ERR(p); if (unlikely(!p)) return -EWOULDBLOCK; @@ -559,7 +559,7 @@ int dm_bm_write_lock_zero(struct dm_block_manager *bm, return -EPERM; p = dm_bufio_new(bm->bufio, b, (struct dm_buffer **) result); - if (unlikely(IS_ERR(p))) + if (IS_ERR(p)) return PTR_ERR(p); memset(p, 0, dm_bm_block_size(bm));