Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2395190ybl; Sat, 31 Aug 2019 14:05:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkW0EK5vBbulzvy1E86qNzbZOJDNweDwJ0LriR5PXZLhzndJ9CJUaQxNcOV2HYCrYxm295 X-Received: by 2002:a63:ec48:: with SMTP id r8mr4070242pgj.387.1567285514498; Sat, 31 Aug 2019 14:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567285514; cv=none; d=google.com; s=arc-20160816; b=cGJjGVkKTHuEqFMYONhdPvp1AEHdexQF0erDINQyLdZyYOsSdMXZJSK/Nizigf5lz4 1PuwOIt+9KMpWMPxYSoD6oIf9WndsTqP1KHcYQVS7+YlPk81YIJcSxhpB9JutiFVa201 XMeh0FwMavg+caZOu0cCwKXwJBpIvGNkkZwaRlfHJfj80lpTD+iw0bIjKvsOg5aNx6+E CVDhgKwNkiyIVbw1LDme/9wmeYQwFw5WC1KOuNUvM3qnAeb3m9skTdCHgols8L/drfnS g+E3pyvNEtTsWsMk+8eScdxLKWce9bPkD7RRY7B3Zy1P71HO99AqtDsyDzWK1YXm501f /7bg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JOkt1Xq1yrsHfK/1NpnOnxpeuczROWMDFL17g6IfVAA=; b=RjcYeD1njSE5r1/Ke8eJ2YnjJNx1al9WpiP2g5WbOQXaeyZzRfaCvtmFuU9AzSoNPm Tu6T+eXOUMpr8yOqsimgGA+1r8rnwkV6J4bJXVGjiWywCWQvgHwAagiZdtm0Asehomfy hrZ55VMdTkwAGq5AGQCXqvpvNkswlzwDGlnX1b4yvQmoWr2vd/MzROClBjOK4AM6jq1r 4grbo1wXXcnOOJp04SGNmWNmz4aV9oawHbnxJLhMN/kUda6vIKZkMzhwPPah8FdCN5nF dqz5r4P6FuUaFONx0DZUyyG6tBuqzqL34dkLL8i9aVwfVt8yjbLdQj0fIqz/RQ6Nrm0h jVPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="pV/9auGE"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6si6300224plo.29.2019.08.31.14.04.56; Sat, 31 Aug 2019 14:05:14 -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=@gmail.com header.s=20161025 header.b="pV/9auGE"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728555AbfHaVEE (ORCPT + 99 others); Sat, 31 Aug 2019 17:04:04 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36475 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728327AbfHaVEE (ORCPT ); Sat, 31 Aug 2019 17:04:04 -0400 Received: by mail-pg1-f193.google.com with SMTP id l21so5280616pgm.3; Sat, 31 Aug 2019 14:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JOkt1Xq1yrsHfK/1NpnOnxpeuczROWMDFL17g6IfVAA=; b=pV/9auGEPtAoN12YoL+WtRizQy+cGjQu2nV8KDGbUbXYnlnNQFLkITroADOozo/bVk 3RR24DJpQDUxnJqfupZIw/meeyUoQ120UzhQP4/fevuzjLt1lEWt8IEldCxg7mQxgsta Aha25WCZZ/gc7MaeqmiciWpYwcsNmYpf+Zl0M201YWCAJu7Ez/9Fa6fZf8CdpsDaggcC sPMsPJZp9ciwcfq4v6bE0BnT0yp5q6Qq6CUMWCBMJulsMpLMVcmLGnFiNcnIewRsraaE XtxK0jm/a+Yb4TZBG9PH9a+SU6z52+BGVNu4p7hIe+ex4CZ+yfoqM3yrfZRayCYZAmOA ezWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=JOkt1Xq1yrsHfK/1NpnOnxpeuczROWMDFL17g6IfVAA=; b=XPqVjstYr3aFhr35e7wl034unS5hS0xeQQLUHGik5sXQv52rFC6QJPD05JvvQ0y7HC j1LA4+xgcw586AsLvs7GbSs6i/hx9B27Nm/yHjikaET2CExJNMODNORkOu2pulmpdnP/ cPWBtXlGNCHiYFRBYPebKvjMqw5bVzUGnTpWPP9VGxy12t4kf09mIyOyJwX+8wnA4XQD bwuzNWUwnXWTThgNOoAoOk8ymv+ffwBp2bx8kvKlVo1suciCKITVC7J/lKmT5+yp9s0d IHTRPfC+abZITZeeynVo0NroL5pQVXVNBnFz/hC350tXV7kCML2Cv1oGPC13a2FWoyBx /ARg== X-Gm-Message-State: APjAAAUGdL4kcG4cQFiCBJLu8KNElOkPglSts1vCFbvBHubIOf1SQ2Rh PIXJ8RjWeeR2pVejyOt0YYQ= X-Received: by 2002:a17:90a:8914:: with SMTP id u20mr5249657pjn.111.1567285443314; Sat, 31 Aug 2019 14:04:03 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id r28sm7774474pfg.62.2019.08.31.14.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2019 14:03:59 -0700 (PDT) Date: Sat, 31 Aug 2019 14:03:56 -0700 From: Dmitry Torokhov To: Joe Perches Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , Denis Efremov , linux-kernel@vger.kernel.org, Andrew Morton , linux-input@vger.kernel.org Subject: Re: [PATCH v3 09/11] Input: alps - remove unlikely() from IS_ERR*() condition Message-ID: <20190831210356.GI187474@dtor-ws> References: <20190829165025.15750-1-efremov@linux.com> <20190829165025.15750-9-efremov@linux.com> <20190829175039.GA187474@dtor-ws> <20190831152500.eg7xqo5ace6wu427@pali> <762056d9c081c40f3fc760c9af79d6851f0a65e5.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <762056d9c081c40f3fc760c9af79d6851f0a65e5.camel@perches.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 31, 2019 at 01:32:02PM -0700, Joe Perches wrote: > On Sat, 2019-08-31 at 17:25 +0200, Pali Roh?r wrote: > > On Thursday 29 August 2019 10:50:39 Dmitry Torokhov wrote: > > > On Thu, Aug 29, 2019 at 07:50:23PM +0300, Denis Efremov wrote: > > > > "unlikely(IS_ERR_OR_NULL(x))" is excessive. IS_ERR_OR_NULL() already uses > > > > unlikely() internally. > > > > > > The keyword here is _internally_. > > > > > > https://lore.kernel.org/lkml/20190821174857.GD76194@dtor-ws/ > > > > > > So please no. > > I think it poor form not to simply restate your original > objection from 4 message levels below this link Thank you for the lesson in etiquette, but I posted reference to the very message I wanted. > > https://lists.gt.net/linux/kernel/2269724 > > Hm... I do not like this change. If I read code > > if (unlikely(IS_ERR_OR_NULL(priv->dev3))) > > then I know that it is really unlikely that condition will be truth and > so this is some case of error/exception or something that normally does > not happen too much. > > But if I read code > > if (IS_ERR_OR_NULL(priv->dev3)) > > I know nothing about chance that this condition will be truth. Explicit > unlikely in previous example give me more information. > > I alslo think this argument is dubious as it also applies > to any IS_ERR and all the unlikely uses have been removed > from those. No, if you read the reference I posted, the argument does not apply to all IS_ERR() instances. Majority of them are in probe() paths where we do not really care about likely/unlikely. Here we are dealing with IS_ERR in a [fairly] hot path. Thanks. -- Dmitry