[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Nov 2014 14:38:51 +0100
From: Petr Mladek <pmladek@...e.cz>
To: Joe Perches <joe@...ches.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Helge Deller <deller@....de>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Wim Van Sebroeck <wim@...ana.be>,
Alexander Viro <viro@...iv.linux.org.uk>,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH -next 1/2] seq_puts: Convert to return void and convert
uses too.
On Mon 2014-11-10 10:58:56, Joe Perches wrote:
> diff --git a/ipc/util.c b/ipc/util.c
> index 106bed0..4f726b7 100644
> --- a/ipc/util.c
> +++ b/ipc/util.c
> @@ -837,8 +837,10 @@ static int sysvipc_proc_show(struct seq_file *s, void *it)
> struct ipc_proc_iter *iter = s->private;
> struct ipc_proc_iface *iface = iter->iface;
>
> - if (it == SEQ_START_TOKEN)
> - return seq_puts(s, iface->header);
> + if (it == SEQ_START_TOKEN) {
> + seq_puts(s, iface->header);
> + return seq_has_overflowed(s);
It should return 0. The overflow is detected by traverse() that is
called from seq_read(). If the overflow happens, the size of the
buffer is increased and show() is called again.
> + }
>
> return iface->show(s, it);
This should stay as is. It seems that the show() function might also
return negative value in case of some other failure. See the error
handling of "error = m->op->show(m, p);" in traverse() in fs/seq_file.c
The rest of the patch looks fine.
Best Regards,
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists