* [PATCH] spufs: remove redundant test on unsigned
[not found] <4A3FF508.3000304@gmail.com>
@ 2009-06-22 22:20 ` Roel Kluin
2009-06-23 9:12 ` Jeremy Kerr
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-06-22 22:20 UTC (permalink / raw)
To: jk; +Cc: linuxppc-dev, Andrew Morton
Unsigned `len' cannot be less than 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Or should it be `if (!buf || len > MAX)' and what should MAX be then?
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index d0b1f3f..8f799ee 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -73,7 +73,7 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
{
int error = 0, cnt = 0;
- if (!buf || len < 0)
+ if (!buf)
return -EINVAL;
while (cnt < len) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spufs: remove redundant test on unsigned
2009-06-22 22:20 ` [PATCH] spufs: remove redundant test on unsigned Roel Kluin
@ 2009-06-23 9:12 ` Jeremy Kerr
0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Kerr @ 2009-06-23 9:12 UTC (permalink / raw)
To: Roel Kluin; +Cc: linuxppc-dev, Andrew Morton
Roel,
> Unsigned `len' cannot be less than 0.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Thanks for the patch. However, we have a patch from Christoph Hellwig
pending that will rework the sputrace code:
http://patchwork.ozlabs.org/patch/28641/
It's currently queued in benh's tree, should be up soon.
Cheers,
Jeremy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-23 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4A3FF508.3000304@gmail.com>
2009-06-22 22:20 ` [PATCH] spufs: remove redundant test on unsigned Roel Kluin
2009-06-23 9:12 ` Jeremy Kerr
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).