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, 4 Aug 2023 12:57:00 +0100
From:   Mark Brown <broonie@...nel.org>
To:     coolrrsh@...il.com
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH 1/2] fixes warning

On Fri, Aug 04, 2023 at 05:21:20PM +0530, coolrrsh@...il.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@...il.com>
> 
> drivers/spi/spi-mpc512x-psc.c:493:5-13:
> WARNING: Unsigned expression compared with zero: mps -> irq < 0

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

>  	mps->irq = platform_get_irq(pdev, 0);
> -	if (mps->irq < 0)
> +	if ((int)mps->irq < 0)
>  		return mps->irq;

Casts are almost always the wrong choice.  If the issue is that the
value is unsigned and can't be negative casting it to signed isn't going
to help, though here possibly the type of the variable is wrong.

Download attachment "signature.asc" of type "application/pgp-signature" (485 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ