Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E0EBC433F5 for ; Fri, 24 Dec 2021 17:54:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353365AbhLXRyd (ORCPT ); Fri, 24 Dec 2021 12:54:33 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:35886 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239382AbhLXRyb (ORCPT ); Fri, 24 Dec 2021 12:54:31 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 5A984205BB7A Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH v3 02/10] ata: pata_platform: Drop use of unlikely() in pata_platform_probe To: Lad Prabhakar , Damien Le Moal CC: Rob Herring , , Prabhakar , References: <20211224131300.18198-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20211224131300.18198-3-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Fri, 24 Dec 2021 20:54:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20211224131300.18198-3-prabhakar.mahadev-lad.rj@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/24/21 4:12 PM, Lad Prabhakar wrote: > pata_platform_probe() isn't a hotpath, which makes it's questionable to > use unlikely(). Therefore let's simply drop it. > > Signed-off-by: Lad Prabhakar > --- > v2-->v3 > * New patch > --- > drivers/ata/pata_platform.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c > index cb3134bf88eb..29902001e223 100644 > --- a/drivers/ata/pata_platform.c > +++ b/drivers/ata/pata_platform.c > @@ -199,14 +199,14 @@ static int pata_platform_probe(struct platform_device *pdev) > * Get the I/O base first > */ > io_res = platform_get_mem_or_io(pdev, 0); > - if (unlikely(!io_res)) > + if (!io_res) > return -EINVAL; > > /* > * Then the CTL base > */ > ctl_res = platform_get_mem_or_io(pdev, 1); > - if (unlikely(!ctl_res)) > + if (!ctl_res) > return -EINVAL; I think you should combine this with patch #1. [...] MBR, Sergey