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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce9dbc1d-0f48-da24-af56-74a93f964e3a@samsung.com>
Date:   Tue, 21 Jan 2020 11:58:32 +0100
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Chen Zhou <chenzhou10@...wei.com>
Cc:     axboe@...nel.dk, linux-ide@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] ata: pata_macio: fix comparing pointer to 0


On 1/21/20 2:28 AM, Chen Zhou wrote:
> Fixes coccicheck warning:
> 
> ./drivers/ata/pata_macio.c:982:31-32:
> 	WARNING comparing pointer to 0, suggest !E
> 
> Compare pointer-typed values to NULL rather than 0.
> 
> Signed-off-by: Chen Zhou <chenzhou10@...wei.com>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/pata_macio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
> index 1bfd015..e47a282 100644
> --- a/drivers/ata/pata_macio.c
> +++ b/drivers/ata/pata_macio.c
> @@ -979,7 +979,7 @@ static void pata_macio_invariants(struct pata_macio_priv *priv)
>  	priv->aapl_bus_id =  bidp ? *bidp : 0;
>  
>  	/* Fixup missing Apple bus ID in case of media-bay */
> -	if (priv->mediabay && bidp == 0)
> +	if (priv->mediabay && !bidp)
>  		priv->aapl_bus_id = 1;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ