* [PATCH 1/1 RESEND] drivers/scsi/sd.c: remove positive test on unsigned value
@ 2014-05-10 10:49 Fabian Frederick
2014-05-10 15:04 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-10 10:49 UTC (permalink / raw)
To: linux-kernel; +Cc: James E.J. Bottomley, akpm
val is unsigned.
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index efcbcd1..b54d4f8 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -296,7 +296,7 @@ protection_type_store(struct device *dev, struct device_attribute *attr,
if (err)
return err;
- if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION)
+ if (val <= SD_DIF_TYPE3_PROTECTION)
sdkp->protection_type = val;
return count;
--
1.8.4.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 RESEND] drivers/scsi/sd.c: remove positive test on unsigned value
2014-05-10 10:49 [PATCH 1/1 RESEND] drivers/scsi/sd.c: remove positive test on unsigned value Fabian Frederick
@ 2014-05-10 15:04 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2014-05-10 15:04 UTC (permalink / raw)
To: fabf; +Cc: linux-kernel, akpm
On Sat, 2014-05-10 at 12:49 +0200, Fabian Frederick wrote:
> val is unsigned.
Please send to linux-scsi@vger.kernel.org ... this is one of Martin's I
think.
James
> Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> drivers/scsi/sd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index efcbcd1..b54d4f8 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -296,7 +296,7 @@ protection_type_store(struct device *dev, struct device_attribute *attr,
> if (err)
> return err;
>
> - if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION)
> + if (val <= SD_DIF_TYPE3_PROTECTION)
> sdkp->protection_type = val;
>
> return count;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-10 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-10 10:49 [PATCH 1/1 RESEND] drivers/scsi/sd.c: remove positive test on unsigned value Fabian Frederick
2014-05-10 15:04 ` James Bottomley
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®