lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Dec 2021 20:54:28 +0300
From:   Sergey Shtylyov <s.shtylyov@....ru>
To:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>
CC:     Rob Herring <robh+dt@...nel.org>, <linux-kernel@...r.kernel.org>,
        Prabhakar <prabhakar.csengg@...il.com>,
        <linux-ide@...r.kernel.org>
Subject: Re: [PATCH v3 02/10] ata: pata_platform: Drop use of unlikely() in
 pata_platform_probe

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 <prabhakar.mahadev-lad.rj@...renesas.com>
> ---
> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ