Re: [PATCH 4/4] staging: gasket: Use __func__ instead of hardcoded string - Style

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

 



On Thu, Jul 12, 2018 at 09:27:15PM +0200, Felix Siegel wrote:
> Changed logging statements to use %s and __func__ instead of hard coding
> the function name in a string.
> 
> Signed-off-by: Felix Siegel <felix.siegel@xxxxxxxxx>
> ---
>  drivers/staging/gasket/apex_driver.c       | 15 ++++++++-------
>  drivers/staging/gasket/gasket_core.c       | 11 ++++++-----
>  drivers/staging/gasket/gasket_ioctl.c      |  4 ++--
>  drivers/staging/gasket/gasket_page_table.c | 13 ++++++++-----
>  4 files changed, 24 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
> index ffcc59d..735d43d 100644
> --- a/drivers/staging/gasket/apex_driver.c
> +++ b/drivers/staging/gasket/apex_driver.c
> @@ -341,7 +341,7 @@ static int apex_add_dev_cb(struct gasket_dev *gasket_dev)
>  	ulong page_table_ready, msix_table_ready;
>  	int retries = 0;
>  
> -	gasket_log_error(gasket_dev, "apex_add_dev_cb.");
> +	gasket_log_error(gasket_dev, "%s.", __func__);

Function calls that do nothing but log "Look at this function I just
entered/exited!" need to just be deleted entirely, as ftrace should be
used instead.

Care to do that here, and then send a patch for the remaining messages
that do need __func__?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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