Re: [PATCH v2] staging: vme_user: using __func__ to replace function's name in printk

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

 



On Mon, Sep 18, 2023 at 04:30:19AM +0800, Piro Yang wrote:
> Fix issue relating to prink message:
> 	*using __func__ to replace function's name
> 
> Issue found by checkpatch
> 
> Signed-off-by: Piro Yang <piroyangg@xxxxxxxxx>
> ---
> Changes in v2:
>   - Firstly, fix only one type of Waring by checkpatch.
> 	using '"%s...", __func__' substitute for function's name of printked information

This is v3, right?

> 
> diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
> index 5960562dcd96..de404c6765f3 100644
> --- a/drivers/staging/vme_user/vme.c
> +++ b/drivers/staging/vme_user/vme.c
> @@ -418,7 +418,7 @@ int vme_slave_get(struct vme_resource *resource, int *enabled,
>  	image = list_entry(resource->entry, struct vme_slave_resource, list);
>  
>  	if (!bridge->slave_get) {
> -		printk(KERN_ERR "vme_slave_get not supported\n");
> +		printk(KERN_ERR "%s not supported\n", __func__);

Please move to real dev_err() calls instead of trying to fix up old and
broken printk() calls.  That's the correct solution here for this
codebase and if you look on the list, I think there are patches that do
this already, right?

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [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