Re: [PATCH] staging: most: video: use __func__ instead of function name

From: Greg KH
Date: Mon May 07 2018 - 09:16:24 EST


On Thu, May 03, 2018 at 03:51:05PM +0530, Abdun Nihaal wrote:
> This fixes the following checkpatch warning in video.c:
>
> WARNING: Prefer using '\"%s...\", __func__' to using function's name
> in a string
>
> Signed-off-by: Abdun Nihaal <abdun.nihaal@xxxxxxxxx>
> ---
> drivers/staging/most/video/video.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
> index 9d7e747519d9..c85e289275a9 100644
> --- a/drivers/staging/most/video/video.c
> +++ b/drivers/staging/most/video/video.c
> @@ -73,7 +73,7 @@ static int comp_vdev_open(struct file *filp)
> struct most_video_dev *mdev = video_drvdata(filp);
> struct comp_fh *fh;
>
> - v4l2_info(&mdev->v4l2_dev, "comp_vdev_open()\n");
> + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

All of these should just be deleted. It's debugging code and if someone
needs/wants to see tracing, they can use ftrace.

Please just drop them all.

thanks,

greg k-h