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 2D5BCC433F5 for ; Fri, 24 Dec 2021 18:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353396AbhLXSDA (ORCPT ); Fri, 24 Dec 2021 13:03:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239382AbhLXSC7 (ORCPT ); Fri, 24 Dec 2021 13:02:59 -0500 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D2BFC061401; Fri, 24 Dec 2021 10:02:59 -0800 (PST) Received: by mail-yb1-xb32.google.com with SMTP id d1so4538942ybh.6; Fri, 24 Dec 2021 10:02:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mVvqox+iTlfHhecgB/rTm7k1ORQ021fA0GYCwmZyBIo=; b=nKzA/ixguPxYzYcM2t4Fzb+Pwj0QNIKul/jnq9y0/BGE/fbF4Yeoopud/eoAtqu9vj 7MV3uD3raZTD0P+JlDfiz3mArG7PkS6OqZSSHiNjXAX4UkPMzv8i/56J7DLUCyKtq12U DNZnN/PM7yZ00fL5se3JmW6X/k9ISSRohYi2dGLhCCVhjvj0byFN1Wibsb/yHET8xcR1 chS6Iu1KKfzklSqTZHgpV4LW6HzIUOT2n2SAeAjv9PGIhu97uBHCoD+eF+sevN0U7UOk ITbby1h6XXNZeIJjG4rPhGV775VIpCmL2BZTflMlqt82uvKLKvK0Y93vfemoxwUG3uQN eF7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mVvqox+iTlfHhecgB/rTm7k1ORQ021fA0GYCwmZyBIo=; b=gL6/LWXRWViPZtcxqeQ3sPn4DX7JWPBm27PGypwTq7nu/QutkFlSMuFYgzOLV8fRK6 mqvUPaTH7jgyNlcz2YrMBBHcGRirDzpBR2d4v9hmMf+7bgXgNnCES+LVx0mwuV1Yk3TW rWoVFoErh/JKSZh1/KHM7Wc2owRD+WP8hEaM9J8FaGoT5kkn+0fxONLFbzYxM10eWMUc FbheA2LpHk+D6KG6xbOFf4UPguXIlEbKDptMF1gf+XsGaP021f0OihmXpX+VaIdyqe1E uz7+3BKZaoIRfpszxej/DYvTZPSwGDQu0d85zb119qCP0yQWDAA9aua2SjL9Pxkqk7c1 PwJw== X-Gm-Message-State: AOAM5331+vftNNQ6HkQCZJrk7YUUs3VF0SX1jYfr+veGHVhL/kZcBBDD 3ECyVqfuJTqnhgsQntabZW15hbsaCgFZ+1TPgrvFG4eyDQw= X-Google-Smtp-Source: ABdhPJwSqUegg5Cp1Ylxxl7fYbYaIR2Wew5uZGWAWobv2FxosvuLfo0h59Cbkm7N8oOxD/f2KtK13JH9wMqlTkk3Ij0= X-Received: by 2002:a25:dc4d:: with SMTP id y74mr10168315ybe.422.1640368978402; Fri, 24 Dec 2021 10:02:58 -0800 (PST) MIME-Version: 1.0 References: <20211224131300.18198-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20211224131300.18198-3-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Fri, 24 Dec 2021 18:02:32 +0000 Message-ID: Subject: Re: [PATCH v3 02/10] ata: pata_platform: Drop use of unlikely() in pata_platform_probe To: Sergey Shtylyov Cc: Lad Prabhakar , Damien Le Moal , Rob Herring , LKML , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergey, Thank you for the review. On Fri, Dec 24, 2021 at 5:54 PM Sergey Shtylyov wrote: > > 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. > I'd like to keep the changes separate from patch #1, as it's unrelated. Cheers, Prabhakar