Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631449 > unrolled thread

[PATCH v4] Staging: most: use __func__ instead of the function name

Started byChandra Annamaneni <chandra627@gmail.com>
First post2017-04-26 15:10 +0200
Last post2017-04-26 23:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4] Staging: most: use __func__ instead of the function  name Chandra Annamaneni <chandra627@gmail.com> - 2017-04-26 15:10 +0200
    Re: [PATCH v4] Staging: most: use __func__ instead of the function  name Dan Carpenter <dan.carpenter@oracle.com> - 2017-04-26 16:10 +0200
      Re: [PATCH v4] Staging: most: use __func__ instead of the function  name Chandra Annamaneni <chandra627@gmail.com> - 2017-04-26 23:30 +0200

#1631449 — [PATCH v4] Staging: most: use __func__ instead of the function name

FromChandra Annamaneni <chandra627@gmail.com>
Date2017-04-26 15:10 +0200
Subject[PATCH v4] Staging: most: use __func__ instead of the function name
Message-ID<tAuRI-2H8-9@gated-at.bofh.it>
Change video.c to use %s, __func__ instead of function names.
Warnings flagged by checkpatch.pl

Signed-off-by: Chandra Annamaneni <chandra627@gmail.com>

diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
index 59e861e..e074841 100644
--- a/drivers/staging/most/aim-v4l2/video.c
+++ b/drivers/staging/most/aim-v4l2/video.c
@@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp)
  	struct most_video_dev *mdev = video_drvdata(filp);
  	struct aim_fh *fh;

-	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
+	v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n");

  	switch (vdev->vfl_type) {
  	case VFL_TYPE_GRABBER:
@@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp)
  	struct most_video_dev *mdev = fh->mdev;
  	struct mbo *mbo, *tmp;

-	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
+	v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n");

  	/*
  	 * We need to put MBOs back before we call most_stop_channel()
@@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
  	struct aim_fh *fh = priv;
  	struct most_video_dev *mdev = fh->mdev;

-	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
+	v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n");

  	*norm = V4L2_STD_UNKNOWN;
  	return 0;
@@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index)
  	struct aim_fh *fh = priv;
  	struct most_video_dev *mdev = fh->mdev;

-	v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index);
+	v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index);

  	if (index >= V4L2_AIM_MAX_INPUT)
  		return -EINVAL;
@@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev)
  {
  	int ret;

-	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
+	v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n");

  	init_waitqueue_head(&mdev->wait_data);

@@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev)

  static void aim_unregister_videodev(struct most_video_dev *mdev)
  {
-	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
+	v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n");

  	video_unregister_device(mdev->vdev);
  }

[toc] | [next] | [standalone]


#1631474

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-04-26 16:10 +0200
Message-ID<tAvNM-3kF-17@gated-at.bofh.it>
In reply to#1631449
On Wed, Apr 26, 2017 at 06:02:29AM -0700, Chandra Annamaneni wrote:
> 
> Change video.c to use %s, __func__ instead of function names.
> Warnings flagged by checkpatch.pl
> 
> Signed-off-by: Chandra Annamaneni <chandra627@gmail.com>
> 
> diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
> index 59e861e..e074841 100644
> --- a/drivers/staging/most/aim-v4l2/video.c
> +++ b/drivers/staging/most/aim-v4l2/video.c
> @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp)
>  	struct most_video_dev *mdev = video_drvdata(filp);
>  	struct aim_fh *fh;
> 
> -	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
> +	v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n");

You sent the reversed patch.

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1631737

FromChandra Annamaneni <chandra627@gmail.com>
Date2017-04-26 23:30 +0200
Message-ID<tACFz-7Oy-11@gated-at.bofh.it>
In reply to#1631474
Sorry!
And thanks for pointing it out.

regards
Chandra

On Wed, 26 Apr 2017, Dan Carpenter wrote:

> On Wed, Apr 26, 2017 at 06:02:29AM -0700, Chandra Annamaneni wrote:
> > 
> > Change video.c to use %s, __func__ instead of function names.
> > Warnings flagged by checkpatch.pl
> > 
> > Signed-off-by: Chandra Annamaneni <chandra627@gmail.com>
> > 
> > diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
> > index 59e861e..e074841 100644
> > --- a/drivers/staging/most/aim-v4l2/video.c
> > +++ b/drivers/staging/most/aim-v4l2/video.c
> > @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp)
> >  	struct most_video_dev *mdev = video_drvdata(filp);
> >  	struct aim_fh *fh;
> > 
> > -	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
> > +	v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n");
> 
> You sent the reversed patch.
> 
> regards,
> dan carpenter
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web