Skip to contentSkip to conversation

Staging: most: use __func__ instead of the function name

PATCH Superseded Chandra Annamaneni 4 participants 11 messages Mar 17, 2017 – Apr 26, 2017 1 message not in the archive

Subsystems (2)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Staging: most: use __func__ instead of the function name

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

drivers/staging/most/aim-v4l2/video.c +6 -6
index e074841..59e861e 100644
@@ -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, "aim_vdev_open()\n");
+	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
 	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, "aim_vdev_close()\n");
+	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
 	/*
 	 * 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, "vidioc_g_std()\n");
+	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
 	*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, "vidioc_s_input(%d)\n", index);
+	v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, 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, "aim_register_videodev()\n");
+	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
 	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, "aim_unregister_videodev()\n");
+	v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
 	video_unregister_device(mdev->vdev);
 }

A message that is not in the archive (sent off-list or not yet received): CAEge-i4Y9jfLjRg5pBB7vMcwLKUgPLwfvOCd65yc4_z4pp_nsQ@mail.gmail.com

maintainer Acked-by
#2 lore raw

Sorry for the delay...

Quoted 11 lines · chandrasekhar annamaneni

Second reminder, please review.

Thanks.
Chandra

On Fri, Mar 17, 2017 at 12:49 PM, Chandra Annamaneni <[email protected] <mailto:[email protected]>> wrote:

Quoted 5 lines

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl <http://checkpatch.pl>

<mailto:[email protected]>>

Quoted 66 lines
    diff --git a/drivers/staging/most/aim-v4l2/video.c
    b/drivers/staging/most/aim-v4l2/video.c
    index e074841..59e861e 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, "aim_vdev_open()\n");
    +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

            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, "aim_vdev_close()\n");
    +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

            /*
             * 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, "vidioc_g_std()\n");
    +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

            *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, "vidioc_s_input(%d)\n", index);
    +       v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, 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, "aim_register_videodev()\n");
    +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

            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, "aim_unregister_videodev()\n");
    +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

            video_unregister_device(mdev->vdev);
     }
#3 lore raw
In reply to a message not in the archive

Third Reminder. Please review.

--
Chandra

Quoted 86 lines · chandrasekhar annamaneni

Second reminder, please review.

Thanks.
Chandra

On Fri, Mar 17, 2017 at 12:49 PM, Chandra Annamaneni <[email protected]> wrote:

      Change video.c to use %s, __func__ instead of function names.
      Warnings flagged by checkpatch.pl

      Signed-off-by: Chandra Annamaneni <[email protected]>

      diff --git a/drivers/staging/most/aim-v4l2/video.c
      b/drivers/staging/most/aim-v4l2/video.c
      index e074841..59e861e 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, "aim_vdev_open()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

              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, "aim_vdev_close()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

              /*
               * 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, "vidioc_g_std()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

              *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, "vidioc_s_input(%d)\n",
      index);
      +       v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, 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, "aim_register_videodev()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

              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,
      "aim_unregister_videodev()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

              video_unregister_device(mdev->vdev);
       }
#4 lore raw

Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

Quoted 2 lines · Chandra Annamaneni

Third Reminder. Please review.

2 days after you asked before?

And I don't even see this patch in my queue, are you sure it hasn't already been handled, or merged, or rejected?

thanks,

greg k-h

#5 lore raw

Sorry about the top posting.

I did ask about it on the 9th of April and the reply was that the email was 'acked'. Since I did not get a further email, I assumed it was lost. Perhaps I misunderstood.

Thanks!
Chandra

Quoted 24 lines · Greg KH

Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

Quoted 2 lines · Chandra Annamaneni

Third Reminder. Please review.

2 days after you asked before?

And I don't even see this patch in my queue, are you sure it hasn't already been handled, or merged, or rejected?

thanks,

greg k-h

#6 lore raw
Quoted 6 lines · Chandra Annamaneni

Sorry about the top posting.

I did ask about it on the 9th of April and the reply was that the email was 'acked'. Since I did not get a further email, I assumed it was lost. Perhaps I misunderstood.

I really do not know, sorry. If you didn't get an automated email from my system that it was applied, rebased it against the latest staging-next branch and resend it.

thanks,

greg k-h

#7 lore raw

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

(quoted diff) +0 -0

b/drivers/staging/most/aim-v4l2/video.c
index e074841..59e861e 100644

drivers/staging/most/aim-v4l2/video.c +2 -2
@@ -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, "aim_vdev_open()\n");
+       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
        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, "aim_vdev_close()\n");
+       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);
 
        /*
         * 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, "vidioc_g_std()\n");
+ v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

        *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, "vidioc_s_input(%d)\n", index);
+ v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, 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, "aim_register_videodev()\n");
+ v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

Quoted 16 lines · Greg KH
Quoted 6 lines · Chandra Annamaneni

Sorry about the top posting.

I did ask about it on the 9th of April and the reply was that the email was 'acked'. Since I did not get a further email, I assumed it was lost. Perhaps I misunderstood.

I really do not know, sorry. If you didn't get an automated email from my system that it was applied, rebased it against the latest staging-next branch and resend it.

thanks,

greg k-h

#8 lore raw
Quoted 5 lines · Chandra Annamaneni

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

Why is this indented? Why is your subject a "Re:"?

#9 lore raw

I assumed the email should be a reply to the previous email so it appears in the thread. As to the leading spaces, it was a problem with my mail client.

Ill resend the patch.

--
Chandra

Quoted 10 lines · Greg KH
Quoted 5 lines · Chandra Annamaneni

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

Why is this indented? Why is your subject a "Re:"?

#10 lore raw
Quoted 5 lines · Chandra Annamaneni

I assumed the email should be a reply to the previous email so it appears in the thread. As to the leading spaces, it was a problem with my mail client.

Ill resend the patch.

Did you read my suggestion to just delete these lines instead?

Quoted 16 lines

--
Chandra

Quoted 10 lines · Greg KH
Quoted 5 lines · Chandra Annamaneni

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

Why is this indented? Why is your subject a "Re:"?

#11 lore raw
In reply to Chandra Annamaneni
Quoted 1 line · Chandra Annamaneni

Third Reminder. Please review.

Patience.

Quoted 2 lines · chandrasekhar annamaneni
Quoted 1 line

Second reminder, please review.

[]

Quoted 5 lines
Quoted 5 lines

On Fri, Mar 17, 2017 at 12:49 PM, Chandra Annamaneni <[email protected]> wrote:

Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl

[]

Quoted 1 line
Quoted 1 line
      diff --git a/drivers/staging/most/aim-v4l2/video.c

[]

Quoted 6 lines
Quoted 6 lines
      @@ -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, "aim_vdev_open()\n");
      +       v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__);

More likely all of these should be deleted
as these seem to be function tracing logging
and ftrace works well.

see: Documentation/trace/ftrace.txt