Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2568073ybl; Thu, 29 Aug 2019 09:53:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqCyJo06EPsn30vpiMAaS7xyHFiRLiQHpBe0A86HdRmavr2RH9RemtPSvw27PYzywS8LTa X-Received: by 2002:a63:711c:: with SMTP id m28mr7835942pgc.396.1567097588543; Thu, 29 Aug 2019 09:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567097588; cv=none; d=google.com; s=arc-20160816; b=RsJaNMMGXRwPceK8t5B0ygwvLB56PIsxjfG4iVFnDDQTe9suwmLCozK3FqVqZELJ21 bgT75ei42uHcxR0W/B23kOOyvgDvD4UfNLJU69ARU10Aey9b5fHbgxYK1iliyibUTCHU Tnr/wMLTecdn88xtGgwaOgTISikWmX8qqKmdHPDrgkXUKE9XR2UVQwP8mAwFWGheIan/ DsEfSKdN4Fg+xngvHPv/sh686rUzwYYzqAcTUjHYSyTtd2/PPDE1M6BF4GJBY5TgJoEv jGeuO+xTZlD8iMwv6wSH1OqKQ6gyniYiCR08/DBD2ovsTJYDm6GB5FTuc5wrhudgyY9N ZoGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1BnYpBfZLwpA0PUdACNai/emnPM3Y0NcYvtOEszcGUE=; b=Cj3V/lAdUAamdzdeHTRphv5n5+q/JnyOnFWd9NQ1G+XugwmBDwqqgNMdMV4yEA+wo+ e4UtZWf+uInTUNSlZCB0P/W5pL19pjln1Mb56lhjXl6gALjdDaJimS/2c1ynL4b3cffF gStAvHfW4m0ssnJwPGK0sSoToXt7YQ+0ClZPHb1XVvEuzzfdPOPCTh0dPZK31XKIsL8B YNljDG0+JN9RnO081wltzgT4kHHE8SBDsGUgFgzfYNOkoOCNHwRSOQh0KAoXQ6tnUD+f 61ffHOBAvmsqpllBBHWZRb5PUfMW6isY2jgsKsi4WXtMsRzbUvLu+wTVL5/YOjLfDh3b ibFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si2255785pll.241.2019.08.29.09.52.52; Thu, 29 Aug 2019 09:53: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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728194AbfH2Qvk (ORCPT + 99 others); Thu, 29 Aug 2019 12:51:40 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37267 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728109AbfH2Qvd (ORCPT ); Thu, 29 Aug 2019 12:51:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id z11so4170157wrt.4; Thu, 29 Aug 2019 09:51:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1BnYpBfZLwpA0PUdACNai/emnPM3Y0NcYvtOEszcGUE=; b=EIeLKmLcL0KJYL9wF2ooxeC8hphqrPj9AFFs5bS1DdJoCZIBJs/rnI3r0Hm5qhDceB 3bH6oQFBtZpbU6+MYkS3tbg4fwzipNwYmWE82LlPA5zVd1T11OulwVU4fqap70lHFObe aiddbBMNiwZcj8obVH+Aqg1VKC8ZoDUxR+4uplhh3gsw1+uUR43KGcVMJVvkgm3zUrOv 4E7txLTPmo5UO5C0eo07oTvbSxeYfc+HVudv+k+yKzLeVU0KzXpny2NxMTjmhuRHZdMG W7n/XaXfcKcdaNmnb5xi+nGeG8b5l9a5CGVEFdpTMTe0/yx6Nfg6dNsM2IcQAN5ahLM5 FONg== X-Gm-Message-State: APjAAAUtHusYk2mh0ssSEEAuX6G9DK6M0ZAGJwPkcxaBa8HslKVHjoLb 1AbY8TY5t0nDX0YWWNQHgWDC9E9YYyo= X-Received: by 2002:adf:e708:: with SMTP id c8mr13068496wrm.25.1567097491287; Thu, 29 Aug 2019 09:51:31 -0700 (PDT) Received: from green.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.googlemail.com with ESMTPSA id o14sm8340770wrg.64.2019.08.29.09.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 09:51:30 -0700 (PDT) From: Denis Efremov To: linux-kernel@vger.kernel.org Cc: Denis Efremov , "Darrick J. Wong" , Joe Perches , Andrew Morton , linux-xfs@vger.kernel.org Subject: [PATCH v3 07/11] xfs: remove unlikely() from WARN_ON() condition Date: Thu, 29 Aug 2019 19:50:21 +0300 Message-Id: <20190829165025.15750-7-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190829165025.15750-1-efremov@linux.com> References: <20190829165025.15750-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely() internally. Signed-off-by: Denis Efremov Cc: "Darrick J. Wong" Cc: Joe Perches Cc: Andrew Morton Cc: linux-xfs@vger.kernel.org --- fs/xfs/xfs_buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index ca0849043f54..4389d87ff0f0 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -2096,7 +2096,7 @@ xfs_verify_magic( int idx; idx = xfs_sb_version_hascrc(&mp->m_sb); - if (unlikely(WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx]))) + if (WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx])) return false; return dmagic == bp->b_ops->magic[idx]; } @@ -2114,7 +2114,7 @@ xfs_verify_magic16( int idx; idx = xfs_sb_version_hascrc(&mp->m_sb); - if (unlikely(WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx]))) + if (WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx])) return false; return dmagic == bp->b_ops->magic16[idx]; } -- 2.21.0