Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2641693ybl; Thu, 29 Aug 2019 10:52:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvU8b/mggLowNnaUbrx7wYTndUDbVNb5VFIKEB0kMPu2CB6i6jYaJrwVN6wUv029BgjIIW X-Received: by 2002:a17:90a:fa8f:: with SMTP id cu15mr11220361pjb.119.1567101122418; Thu, 29 Aug 2019 10:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567101122; cv=none; d=google.com; s=arc-20160816; b=gtcy6OcJPJosSzLhRxFLik1P3SEZ/QOThgdARFyz/N2p9Qz8gXktCkaKkGv3XvCq7V fPzRIqkKEWbnOqmPa0gdn7p3WESUbHd1eKxYNAg7cZcaH0dE961S0/ABdOvNEQOOB8Dv fPm4Tf3HaRjPbmAa6vCSm/TNjWYMyBco4iIDWOp2tpC845Mv1pPvy/H7p2RotH5Ajmum a3kO1yzK3XPmHQg3ymlEkPsg5x65PBhN5g/reHHHtLFOpxdlbaCaYnaD6U5J951rBC38 VbkRxho3nad+V530SJj6TXxMwH5JbBjIUpVhz9swTCaY5DxoGtarDY4pzezSVSlWbrN1 GbLA== 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=C0c3Z1paEgDZynzXFK49rQPn2NcgrpyMRJRXJjSfdS0=; b=jjSM+2nn8I1aZf05I0iqqM3ARZkBrnD0yoc75wUIrrhjl/B/2GTjB7vYhn6/e7/4Hu 3DxCN4SlRIfo/ah50okFxAmKF0j9yAEi2HqfSSk6X/8nK51pje+q3uOfSyWjrVgUxRT2 ggUJNbHNKWllL9JmRznuS8N7bZyf4sStGcj/sTrCpuzSLykCkME6GlCID8JMh0vKv1u5 1StcB2yy7CHL3zRor35edSvhISPA3IvS3eeJ+zmCIg2KRv+tNOe9v5afIq0SUcO0vu+C EZqw4NbiSRgeoegfLWdkSFG/9gou7p6L0QwzLST4vQPt3x6Ocq3OHEkSYTq2EPGeeqDz 6o/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXqjVb4y; 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 1si2588351plw.278.2019.08.29.10.51.46; Thu, 29 Aug 2019 10:52:02 -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=EXqjVb4y; 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 S1727860AbfH2Ruo (ORCPT + 99 others); Thu, 29 Aug 2019 13:50:44 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38492 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfH2Ruo (ORCPT ); Thu, 29 Aug 2019 13:50:44 -0400 Received: by mail-pf1-f195.google.com with SMTP id o70so2569047pfg.5; Thu, 29 Aug 2019 10:50:44 -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=C0c3Z1paEgDZynzXFK49rQPn2NcgrpyMRJRXJjSfdS0=; b=EXqjVb4y/WwUgZeTgYtqQrj2s+pCQQ3Wd5fATC2hSxen/zrMsXPZ/8WjzNYuJYUotp DxUq01LQs7mDdr3uRa7nxQ88FJYxvayxO+Op3t91FrFw47BggasnQWWmVP1WjZ36UPUB gWcP84+R19b0xsQIaMhbY329hqAhc2rVpmEGFd8LXH9S9f/8S3KqrXJF7k2Ahsi6OO/Z D31LZX7+vskardnB0PUtFvCPxfCt+RLH3uzDMFEmJceVCT4AAlbdWajSKHuVUTvnOLcu dmPMH+H/HY4KpmRJKQSL5vqMpTlc8F4ac04iH3mW5oOkoHEQixwJOtei+ipQjOXJC3l9 toog== 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=C0c3Z1paEgDZynzXFK49rQPn2NcgrpyMRJRXJjSfdS0=; b=ZvrZIao3UBlFgPt0+V+lwGxzp4wC9Xll24D5pESGC7VWij7LYi6tOQUSqQCPN/bC82 5+vd/2rm5tp3UxbFToOvETOlUEzWm5lwg9MrcXYk+YuEK0p3BP1esL5zGLs/kTPPmpf0 /hfwFIGRdk8zvqUSqSlLWkhAvWx+DVinG1GeiTY1l2E9Uq8Jg9+wyX8GCwu3hWyIdVAI fFl0UjZ4EreCn3n8uv4TZOhdJiZLVP7yaLLuBWI7niuzRR1uUrXAJ2nEoPgJFJ22xFrh 9HkZSKHOuCfh4HUB1ah1f0YWGcVI0Sugo0FyrRwbroOeuvi8LySCjX6uboVoeMEe02bh CbYA== X-Gm-Message-State: APjAAAWf0DCQ47ZeHGXVW1/62EyOtB+tNsV1VwqaT+8hC6aCm15g8Q4m 1fZy7LNEiLzx32Hl3mrZVsI= X-Received: by 2002:aa7:9112:: with SMTP id 18mr13054322pfh.127.1567101043175; Thu, 29 Aug 2019 10:50:43 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id p10sm3618213pff.132.2019.08.29.10.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 10:50:42 -0700 (PDT) Date: Thu, 29 Aug 2019 10:50:39 -0700 From: Dmitry Torokhov To: Denis Efremov Cc: linux-kernel@vger.kernel.org, Pali =?iso-8859-1?Q?Roh=E1r?= , Joe Perches , Andrew Morton , linux-input@vger.kernel.org Subject: Re: [PATCH v3 09/11] Input: alps - remove unlikely() from IS_ERR*() condition Message-ID: <20190829175039.GA187474@dtor-ws> References: <20190829165025.15750-1-efremov@linux.com> <20190829165025.15750-9-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190829165025.15750-9-efremov@linux.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 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. > > Signed-off-by: Denis Efremov > Cc: "Pali Roh?r" > Cc: Dmitry Torokhov > Cc: Joe Perches > Cc: Andrew Morton > Cc: linux-input@vger.kernel.org > --- > drivers/input/mouse/alps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c > index 34700eda0429..ed1661434899 100644 > --- a/drivers/input/mouse/alps.c > +++ b/drivers/input/mouse/alps.c > @@ -1476,7 +1476,7 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse, > /* On V2 devices the DualPoint Stick reports bare packets */ > dev = priv->dev2; > dev2 = psmouse->dev; > - } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) { > + } else if (IS_ERR_OR_NULL(priv->dev3)) { > /* Register dev3 mouse if we received PS/2 packet first time */ > if (!IS_ERR(priv->dev3)) > psmouse_queue_work(psmouse, &priv->dev3_register_work, > -- > 2.21.0 > -- Dmitry