Re: [PATCH] staging: vme_user: Fixed prink formatting issues

Greg KH
2023-09-17T18:35:32Z

On Mon, Sep 18, 2023 at 01:18:24AM +0800, Piro Yang wrote:
> Fixed issues relating to prink message including:
>
> a. using __func__ to replace function's name
> b. using pr_warn to replace "printk(KERN_ERR"
>
> Issue found by checkpatch
>
> Signed-off-by: Piro Yang <piroyangg@gmail.com>
> ---
> drivers/staging/vme_user/vme.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
> index 5960562dcd96..56c528628e7d 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");
> + pr_warn("%s not supported\n", __func__);

KERN_ERR is not the same thing a pr_warn(), why did you make this
change?

And you are doing multiple things in the same change, why?

Also, drivers should always use dev_warn(), not pr_*() calls.

thanks,

greg k-h