From patchwork Fri Jul 31 11:02:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51767 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 8866922A8D for ; Fri, 31 Jul 2015 11:03:10 +0000 (UTC) Received: by wixh2 with SMTP id h2sf7336368wix.0 for ; Fri, 31 Jul 2015 04:03:09 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=WhX1YdUVSIDBE/0FHGjW8zMChf9fM+VhisdW/cyDvvw=; b=fkPhsHgOIE+11NH9sI6DSm6lCODWnVnX9Ff6cBkMXsZ87ttK/T5TZ1vp1TQfNYeNN8 BzIlwUEBO6qeoz6vwd0K2ZacucbBzjOEgQ7jwdHptRHLlsZrNRoFQbeMOj8uytYOipUB dOeiPYEdiPEvROiPnk5MIri+bjJhbUnQH+mZiowlDsZqV3NWKiBvdYLXaH2090xtmY3e /jgHj9kfGBgUHnWTSehID9UxcGmAmD+x0ldSt/5dstOpcZ6TryMR1WS+RA9JEHH3Rh/Z u9Y8s99aOiUUlp++MlPx2U9uMn2IWudL/IjPSSO8URmibppWb1GaRLetNVHRTgW9L9oo um5g== X-Gm-Message-State: ALoCoQmibRo3rcAr88TWzVtZO7YCGECYCnvd7z1eVCg1gSEhW2mQ9C7i3xJ8Ro2NfwPHQMA+GR51 X-Received: by 10.112.148.101 with SMTP id tr5mr756680lbb.13.1438340589674; Fri, 31 Jul 2015 04:03:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.133 with SMTP id v5ls35864lae.63.gmail; Fri, 31 Jul 2015 04:03:09 -0700 (PDT) X-Received: by 10.112.190.10 with SMTP id gm10mr2184005lbc.2.1438340589369; Fri, 31 Jul 2015 04:03:09 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id l3si3306069lbq.158.2015.07.31.04.03.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 04:03:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbyj8 with SMTP id yj8so44016996lbb.0 for ; Fri, 31 Jul 2015 04:03:09 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr2241775lbb.56.1438340588986; Fri, 31 Jul 2015 04:03:08 -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 l6csp306628lba; Fri, 31 Jul 2015 04:03:07 -0700 (PDT) X-Received: by 10.70.88.2 with SMTP id bc2mr5622882pdb.153.1438340587759; Fri, 31 Jul 2015 04:03:07 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fu9si9540399pdb.221.2015.07.31.04.03.06; Fri, 31 Jul 2015 04:03:07 -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 S1751430AbbGaLDE (ORCPT + 28 others); Fri, 31 Jul 2015 07:03:04 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:36763 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbbGaLDB (ORCPT ); Fri, 31 Jul 2015 07:03:01 -0400 Received: by pdjr16 with SMTP id r16so42051964pdj.3 for ; Fri, 31 Jul 2015 04:03:01 -0700 (PDT) X-Received: by 10.70.98.200 with SMTP id ek8mr5648823pdb.95.1438340581204; Fri, 31 Jul 2015 04:03:01 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id mk6sm7114522pab.9.2015.07.31.04.02.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 04:02:59 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, Viresh Kumar , "Kirill A. Shutemov" , Andreas Dilger , Aya Mahfouz , devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), Dmitry Eremin , Greg Kroah-Hartman , HPDD-discuss@lists.01.org (moderated list:STAGING - LUSTRE PARALLEL FILESYSTEM), Joe Perches , Julia Lawall , linux-kernel@vger.kernel.org (open list), Oleg Drokin , Supriya Karanth Subject: [PATCH] staging: lustre: drop redundant check Date: Fri, 31 Jul 2015 16:32:43 +0530 Message-Id: <84d006aed984454009e165d57587affa819ac6df.1438340488.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: <20150731102310.GA31850@node.dhcp.inet.fi> References: <20150731102310.GA31850@node.dhcp.inet.fi> 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.170 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: , There is no need to verify that its an error, as we are anyway going to match the error value to -ENOENT. Drop the redundant check. Reported-by: "Kirill A. Shutemov" Signed-off-by: Viresh Kumar --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 6cd3af8c6237..8e472327c880 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -674,7 +674,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, cfs_hash_bd_lock(hs, &bd, 1); shadow = htable_lookup(s, &bd, f, waiter, &version); - if (likely(IS_ERR(shadow) && PTR_ERR(shadow) == -ENOENT)) { + if (likely(PTR_ERR(shadow) == -ENOENT)) { struct lu_site_bkt_data *bkt; bkt = cfs_hash_bd_extra_get(hs, &bd);