From: Roel Kluin <roel.kluin@gmail•com>
To: Arnd Bergmann <arndbergmann@googlemail•com>
Cc: cbe-oss-dev@lists•ozlabs.org, linuxppc-dev@ozlabs•org,
Jeremy Kerr <jk@ozlabs•org>,
Andrew Morton <akpm@linux-foundation•org>,
linuxppc-dev@lists•ozlabs.org, cbe-oss-dev@ozlabs•org
Subject: Re: [Cbe-oss-dev] [PATCH] spufs: Fix test in spufs_switch_log_read()
Date: Wed, 14 Oct 2009 17:32:28 +0200 [thread overview]
Message-ID: <4AD5EF0C.9050603@gmail.com> (raw)
In-Reply-To: <200910131531.45726.arnd@arndb.de>
size_t len cannot be less than 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail•com>
---
>>> Or can this test be removed?
>>
>> I'd prefer just to remove the test.
>
> Yes, sounds good.
If you meant only the left-hand part, here you go:
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 884e8bc..64a4c2d 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2494,7 +2494,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
int error = 0, cnt = 0;
- if (!buf || len < 0)
+ if (!buf)
return -EINVAL;
error = spu_acquire(ctx);
next prev parent reply other threads:[~2009-10-14 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 13:12 [PATCH] spufs: Fix test in spufs_switch_log_read() Roel Kluin
2009-10-13 0:49 ` [Cbe-oss-dev] " Jeremy Kerr
2009-10-13 13:31 ` Arnd Bergmann
2009-10-14 15:32 ` Roel Kluin [this message]
2009-11-24 0:24 ` Jeremy Kerr
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=4AD5EF0C.9050603@gmail.com \
--to=roel.kluin@gmail$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=arndbergmann@googlemail$(echo .)com \
--cc=cbe-oss-dev@lists$(echo .)ozlabs.org \
--cc=cbe-oss-dev@ozlabs$(echo .)org \
--cc=jk@ozlabs$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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