[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abc6fd12-345b-40ac-838c-7e7c954ffcbd@sirena.org.uk>
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