Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2880033ybl; Thu, 29 Aug 2019 14:23:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPXPMM2D0pHu8vLkzZIeo/HRZI9brJCw2HrR6hA0PlEkHL7bHREWBaH7BbnwKtDRUafio4 X-Received: by 2002:a17:902:1004:: with SMTP id b4mr11814111pla.340.1567113837990; Thu, 29 Aug 2019 14:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567113837; cv=none; d=google.com; s=arc-20160816; b=Y/UKlsy+Tx30fMV5d45qj/chdnLu2AD/JSrx0LTH6A2SW8d9N8wk/7+8rtPVsfAUFd N4fmfJaRucidhyyXkgFLfmmQG6GUO6Aebuk2e2vvd6FuE9mr8t3hheOX9qHnPcESXZ2M UUBL0RaCjlcm4NJVi3O16hY4M/tYwpmz6e66a75dD7ibvx4hWawPO4ztU/v3Ijit3G+L VYrGXyuqv+fJML7E0dSk1g81+0iJJruAJ3/9Uq4uhXe3WlDMe4hH3qcRPVgpoI4AEDkv /qW6mh5ppkIqgb4PvQFdBHHY7I7rLk95xeoUWN6/ntMiKQTHh0RWIb6RxdCX180lIaoG 4mbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YCmDkvHRK2H6uwl53GM/Ym/ZWwOlzOXox5M0iq/kVD0=; b=MfEcRGanOXIFni/KIbW+LKYFUKLYzJAQoZOWNrG+M/QhnzWbvCgBFRGPmNzPqpWLeS 1W9P/NQGMR8FjQQTrFuSz/xPr/hdQt/E375kUjlX4dWKjBu3S0sL5eL4T2tE4+haCqpx daQqIrpWBIDRASvHBNrUJxzMc/vy0UYD4ci+j2lvpbcrHts8kzUrfqvlps031ftBx5iv qbk4i5YEhKozJ2Od1QCjYO21PTjyNu2TKyl3DwhzjqOFxSx1m/R2C8ZfbIGTkedqDoUT F9elPozU3uqcgB6gSjP+/x0J7VDGJe76Xx51ubC1M0kpefGortYClwDaGJ8zq+fu4rOT NTcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ZMNwbJZj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si3159351pju.108.2019.08.29.14.23.41; Thu, 29 Aug 2019 14:23: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; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ZMNwbJZj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbfH2VWn (ORCPT + 99 others); Thu, 29 Aug 2019 17:22:43 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:58284 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfH2VWm (ORCPT ); Thu, 29 Aug 2019 17:22:42 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7TLExTU161570; Thu, 29 Aug 2019 21:22:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=YCmDkvHRK2H6uwl53GM/Ym/ZWwOlzOXox5M0iq/kVD0=; b=ZMNwbJZj2ZgFJpkSXzppb3pQN0+j9sp7OQqD8mosZdeR+OFYr78lpcp8C9RPbdFzfkn5 vjaj53UuQau76LhMZHq3K67woYQtcO/3uWZXY/IS//siNUeHCAQLAAGl5GzVQN/enIMl 2o4Sh86v98+IwVs2aKDK7BVx9hx/BCVzpXevVxcbbUf4MHhcK/j5hwGo4wH1WZaLkRv/ PAiQk1VZUK8Tjcaqym2138yon6AR6ZM5iiqccD3qfWyoI7cMv1eUtVIF4zuuXjZ1QzFm i/a0fbiJE1+3FM0amh++wCkDnDfb69KYxkCZ/I4OBc8x5WiUoecXHJcxtj4eP547yEIq 8g== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2uppet02ek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Aug 2019 21:22:34 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7TLE7d3018400; Thu, 29 Aug 2019 21:22:34 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2unvu0m7at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Aug 2019 21:22:34 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x7TLMXjb030866; Thu, 29 Aug 2019 21:22:33 GMT Received: from localhost (/10.145.178.11) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Aug 2019 14:22:33 -0700 Date: Thu, 29 Aug 2019 14:22:32 -0700 From: "Darrick J. Wong" To: Denis Efremov Cc: linux-kernel@vger.kernel.org, Joe Perches , Andrew Morton , linux-xfs@vger.kernel.org Subject: Re: [PATCH v3 07/11] xfs: remove unlikely() from WARN_ON() condition Message-ID: <20190829212232.GN5354@magnolia> References: <20190829165025.15750-1-efremov@linux.com> <20190829165025.15750-7-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829165025.15750-7-efremov@linux.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9364 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908290214 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9364 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908290214 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 07:50:21PM +0300, Denis Efremov wrote: > "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 LGTM, Reviewed-by: Darrick J. Wong --D > --- > 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 >