From: Mark Brown <broonie@kernel.org>
To: coolrrsh@gmail.com
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH 1/2] fixes warning
Date: Fri, 4 Aug 2023 12:57:00 +0100 [thread overview]
Message-ID: <abc6fd12-345b-40ac-838c-7e7c954ffcbd@sirena.org.uk> (raw)
In-Reply-To: <20230804115121.34035-1-coolrrsh@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 899 bytes --]
On Fri, Aug 04, 2023 at 05:21:20PM +0530, coolrrsh@gmail.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@gmail.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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
prev parent reply other threads:[~2023-08-04 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 11:51 coolrrsh
2023-08-04 11:51 ` [PATCH 2/2] " coolrrsh
2023-08-04 11:57 ` Greg KH
2023-08-04 11:57 ` Mark Brown
2023-08-04 11:57 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abc6fd12-345b-40ac-838c-7e7c954ffcbd@sirena.org.uk \
--to=broonie@kernel.org \
--cc=coolrrsh@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®