From: Subhash Jadavani <subhashj@codeaurora.org>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Vinayak Holikatti <vinholikatti@gmail.com>,
Christoph Hellwig <hch@lst.de>,
Yaniv Gardi <ygardi@codeaurora.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi-owner@vger.kernel.org
Subject: Re: [scsi] scsi: ufs: don't check unsigned type for a negative value
Date: Wed, 15 Mar 2017 15:57:09 -0700 [thread overview]
Message-ID: <ff45704c3fcc601bf67149bd69cfdc23@codeaurora.org> (raw)
In-Reply-To: <1489598802.2387.25.camel@HansenPartnership.com>
On 2017-03-15 10:26, James Bottomley wrote:
> On Mon, 2017-03-13 at 17:19 -0700, Subhash Jadavani wrote:
>> On 2017-03-12 03:22, Tomas Winkler wrote:
>> > Fix compilation warning
>> >
>> > drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned
>> > expression < 0 is always false [-Wtype-limits]
>> > if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX))
>> >
>> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>> > ---
>> > drivers/scsi/ufs/ufshcd.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> > index 1359913bf840..e8c26e6e6237 100644
>> > --- a/drivers/scsi/ufs/ufshcd.c
>> > +++ b/drivers/scsi/ufs/ufshcd.c
>> > @@ -7642,7 +7642,7 @@ static inline ssize_t
>> > ufshcd_pm_lvl_store(struct
>> > device *dev,
>> > if (kstrtoul(buf, 0, &value))
>> > return -EINVAL;
>> >
>> > - if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX))
>> > + if (value >= UFS_PM_LVL_MAX)
>> > return -EINVAL;
>> >
>> > spin_lock_irqsave(hba->host->host_lock, flags);
>>
>> LGTM.
>> Reviewed-by: Subhash Jadavani <subhashj@codaurora.org>
>
> Mis-spelling someone else's email can be cut and paste; mis-spelling
> your own might be the early indications of an identity crisis.
>
> We do cut and paste these tags, so getting your own name right for the
> purposes of git history is useful.
>
> James
Oops, sorry for this. If you haven't already corrected this:
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-03-15 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-12 10:22 [scsi] scsi: ufs: don't check unsigned type for a negative value Tomas Winkler
2017-03-14 0:19 ` Subhash Jadavani
2017-03-15 17:26 ` James Bottomley
2017-03-15 22:57 ` Subhash Jadavani [this message]
2017-03-14 3:02 ` Martin K. Petersen
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=ff45704c3fcc601bf67149bd69cfdc23@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tomas.winkler@intel.com \
--cc=vinholikatti@gmail.com \
--cc=ygardi@codeaurora.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;
as well as URLs for NNTP newsgroup(s).