lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Oct 2014 07:31:32 -0700
From:	Joe Perches <joe@...ches.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Al Viro <viro@...IV.linux.org.uk>, Petr Mladek <pmladek@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jiri Kosina <jkosina@...e.cz>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jeff Layton <jlayton@...chiereds.net>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 5/7] fs: Convert show_fdinfo functions to void

On Tue, 2014-10-28 at 10:11 -0400, Steven Rostedt wrote:
> On Mon, 29 Sep 2014 16:08:25 -0700
> Joe Perches <joe@...ches.com> wrote:
> 
> > seq_printf functions shouldn't really check the return value.
> > Checking seq_is_full occasionally is used instead.
> > 
> > Update vfs documentation.
> > 
> > Signed-off-by: Joe Perches <joe@...ches.com>
> 
> 
> >  
> > -#ifdef CONFIG_PROC_FS
> > -static int eventfd_show_fdinfo(struct seq_file *m, struct file *f)
> > +static void eventfd_show_fdinfo(struct seq_file *m, struct file *f)
> >  {
> > +#ifdef CONFIG_PROC_FS
> >  	struct eventfd_ctx *ctx = f->private_data;
> > -	int ret;
> >  
> >  	spin_lock_irq(&ctx->wqh.lock);
> > -	ret = seq_printf(m, "eventfd-count: %16llx\n",
> > -			 (unsigned long long)ctx->count);
> > +	seq_printf(m, "eventfd-count: %16llx\n",
> > +		   (unsigned long long)ctx->count);
> >  	spin_unlock_irq(&ctx->wqh.lock);
> > -
> > -	return ret;
> > -}
> >  #endif
> > +}
> >  
> >  static const struct file_operations eventfd_fops = {
> > -#ifdef CONFIG_PROC_FS
> >  	.show_fdinfo	= eventfd_show_fdinfo,
> > -#endif
> 
> I wouldn't change logic on this. There's no reason to call this
> function if it isn't doing anything.
> 
> I'll change this to just do the update and not change logic like this.

Fewer #ifdefs


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists