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] [day] [month] [year] [list]
Date:	Tue, 26 Jun 2012 15:03:06 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Samuel Iglesias Gonsálvez 
	<siglesias@...lia.com>
Cc:	Sherwin Soltani <sherwin@...c.com>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, swetland@...gle.com
Subject: Re: [PATCH] drivers: staging: android: binder.c: fix printk macros

On Tue, Jun 26, 2012 at 08:43:00AM +0200, Samuel Iglesias Gonsálvez wrote:
> On Tue, 2012-06-26 at 02:00 -0400, Sherwin Soltani wrote:
> > Change printk() messages to pr_* macros.
> > 
> > Signed-off-by: Sherwin Soltani <sherwin@...c.com>
> > ---
> >  drivers/staging/android/binder.c |   54 +++++++++++++++++++-------------------
> >  1 file changed, 27 insertions(+), 27 deletions(-)
> > 
> > diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> > index c283212..574e992 100644
> > --- a/drivers/staging/android/binder.c
> > +++ b/drivers/staging/android/binder.c
> > @@ -124,13 +124,13 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
> >  #define binder_debug(mask, x...) \
> >  	do { \
> >  		if (binder_debug_mask & mask) \
> > -			printk(KERN_INFO x); \
> > +			pr_info(x); \
> >  	} while (0)
> >  
> >  #define binder_user_error(x...) \
> >  	do { \
> >  		if (binder_debug_mask & BINDER_DEBUG_USER_ERROR) \
> > -			printk(KERN_INFO x); \
> > +			pr_info(x); \
> >  		if (binder_stop_on_user_error) \
> >  			binder_stop_on_user_error = 2; \
> >  	} while (0)
> > @@ -418,7 +418,7 @@ repeat:
> >  #if 1
> >  	/* Sanity check */
> >  	if (fdt->fd[fd] != NULL) {
> > -		printk(KERN_WARNING "get_unused_fd: slot %d not NULL!\n", fd);
> > +		pr_warn("get_unused_fd: slot %d not NULL!\n", fd);
> >  		fdt->fd[fd] = NULL;
> >  	}
> >  #endif
> > @@ -644,7 +644,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
> >  		goto free_range;
> >  
> >  	if (vma == NULL) {
> > -		printk(KERN_ERR "binder: %d: binder_alloc_buf failed to "
> > +		pr_err("binder: %d: binder_alloc_buf failed to "
> >  		       "map pages in userspace, no vma\n", proc->pid);
> 
> Instead of using the "binder: " prefix here and there and now that you
> have changed to pr_* functions, you can define the pr_fmt macro at the
> beginning of the file (just before the #include sentences).

That's a good idea, but not necessary for this patch.  A follow-on patch
perhaps :)

greg k-h
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ