Re: [PATCH] drivers: staging: android: binder.c: fix printk macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-06-26 at 02:00 -0400, Sherwin Soltani wrote:
> Change printk() messages to pr_* macros.
> 
> Signed-off-by: Sherwin Soltani <sherwin@xxxxxxxx>
> ---
>  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).

Regards,

Sam


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux