Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1667816imm; Wed, 16 May 2018 01:01:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpQ7IWg6ZryqJYbbSpYUfTKIajh/2zQCd1TmeLr47BS22Dmn1HUH2/TH//eh9wXoRQeQOHc X-Received: by 2002:a63:755e:: with SMTP id f30-v6mr15506332pgn.149.1526457691386; Wed, 16 May 2018 01:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526457691; cv=none; d=google.com; s=arc-20160816; b=LMxADQXe5WnJle5jJw/C7YdMwCCxbhwnSA2e0mef5tGfkf/FO5H1gxj+TBR7ZJrtRw fQXEhh9FbEAcf1TDC0VJ1VvGhDXwr3FDrciES0PmahOl6Ya+4PBxlHDbgVp6LYE49jDk 6eI80EFyCfp4K/NI4Dx1VgLLtxunv5iPCOESIs4ztqw1F0ZyJLRup0qmFowup75BVY9v U19GyUdyXNRhb4GMJb4SlBaBiuO9OKD2ncjWezS71n3gnjVtC2UVHWe4psP/gh2SI+HS QA/VAhLp5X4+NfPugtaVWqq7IamyuqVEhWH+S0ho6Ca1rFrre/bMw31/c9BQ1hTF7JFF Nalg== 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:arc-authentication-results; bh=ZaaTCSk4JHLhGIsm1dM+tDqV1QE8mXzrko0DsYJ1hjc=; b=bNeOjQ/tiHRzc42oDvOCC+AYn1LWTGgUe6rcyR1px7PqoKe4XqaIZq8hiMFovp2God EylFmKFBiYsRTZWXCpyOLW8LB3qqwYNEwkolX9PG7BlrAm9eu+S9bhOs5PVFCEdlv45n o1JFab3BukCn5Riw1YLWY62qzdVUGdTkdLjRTeR27EiHz9b+eBtcpcRIFYZX+akp3DmA xKsbzYzk6poz1ydAi3lL8LG6uVcfNaoroaB8XRrftHeVIHOgONTohM+tNUOnKFEthSch rlmdubPTJtqyY217lqNRPdF/R5Po0VmChupqP7GEtXNVq+z8rjgCNJxCmktoxcf4lcBF jxFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=KpRZ8kTO; 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 t8-v6si1933426plz.93.2018.05.16.01.01.16; Wed, 16 May 2018 01:01:31 -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-2017-10-26 header.b=KpRZ8kTO; 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 S1752022AbeEPIBD (ORCPT + 99 others); Wed, 16 May 2018 04:01:03 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:39546 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbeEPIBB (ORCPT ); Wed, 16 May 2018 04:01:01 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4G80Yqt003248; Wed, 16 May 2018 08:00:34 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-2017-10-26; bh=ZaaTCSk4JHLhGIsm1dM+tDqV1QE8mXzrko0DsYJ1hjc=; b=KpRZ8kTO50op5PaYmdQValU7mxfM4K4R1MI1xmaTxw+SF52Uw6+2VbnvwcX3xzXgBzN5 bNr6EdpXuW4GMTO0OrPz0Eog2jEJafY8n8siOXmlEQTAVOEg358kUMV+Y1zVwKWw1yr6 eUl07NNTOCiMRCPu9v9iWfT+IKMeufg0HRkCdGIoXDFNMljdsjnf5aiEvvv8XeKe4GiT ezWfSckfvFYQ7FwoinH7BQ2X9vH/+NwDqiW4jByHbIFw0cqyH79tli5k2Xek/+6z5kBi TIfoizDvvA3tjleScpoVGFc6lkZ+vKimv3VxVrU46WVoMYm7a5skFFGYv/3qw7CQdnS9 5w== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2hx29w3mj1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 08:00:34 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4G80XHo009644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 May 2018 08:00:34 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4G80VRT028605; Wed, 16 May 2018 08:00:31 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 16 May 2018 01:00:31 -0700 Date: Wed, 16 May 2018 11:00:22 +0300 From: Dan Carpenter To: James Simmons Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , Lai Siyao , Jinshan Xiong , NeilBrown , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode Message-ID: <20180516080022.b4ihz7opiueobm7u@mwanda> References: <1525285308-15347-1-git-send-email-jsimmons@infradead.org> <1525285308-15347-5-git-send-email-jsimmons@infradead.org> <20180508114500.qrtnjax4siupgv3n@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8894 signatures=668698 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-1711220000 definitions=main-1805160082 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 04:02:55PM +0100, James Simmons wrote: > > > > /* > > > * Allocate new object. This may result in rather complicated > > > * operations, including fld queries, inode loading, etc. > > > */ > > > o = lu_object_alloc(env, dev, f, conf); > > > - if (IS_ERR(o)) > > > + if (unlikely(IS_ERR(o))) > > > return o; > > > > > > > This is an unrelated and totally pointless. likely/unlikely annotations > > hurt readability, and they should only be added if it's something which > > is going to show up in benchmarking. lu_object_alloc() is already too > > slow for the unlikely() to make a difference and anyway IS_ERR() has an > > unlikely built in so it's duplicative... > > Sounds like a good checkpatch case to test for :-) The likely/unlikely annotations have their place in fast paths so a checkpatch warning would get annoying... regards, dan carpenter