* [patch] splice: comparing unsigned int < 0
@ 2010-02-25 7:18 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-02-25 7:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Alexey Dobriyan, Aravind Srinivasan, linux-kernel,
kernel-janitors
"ret" needs to be signed or the error handling for splice_to_pipe() won't work
correctly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/kernel/relay.c b/kernel/relay.c
index c705a41..3d97f28 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -1215,14 +1215,14 @@ static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i)
/*
* subbuf_splice_actor - splice up to one subbuf's worth of data
*/
-static int subbuf_splice_actor(struct file *in,
+static ssize_t subbuf_splice_actor(struct file *in,
loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags,
int *nonpad_ret)
{
- unsigned int pidx, poff, total_len, subbuf_pages, nr_pages, ret;
+ unsigned int pidx, poff, total_len, subbuf_pages, nr_pages;
struct rchan_buf *rbuf = in->private_data;
unsigned int subbuf_size = rbuf->chan->subbuf_size;
uint64_t pos = (uint64_t) *ppos;
@@ -1241,6 +1241,7 @@ static int subbuf_splice_actor(struct file *in,
.ops = &relay_pipe_buf_ops,
.spd_release = relay_page_release,
};
+ ssize_t ret;
if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
return 0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-25 7:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 7:18 [patch] splice: comparing unsigned int < 0 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox