linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: video: fix warning unused variable
@ 2018-05-14 10:54 Anders Roxell
  2018-05-14 11:01 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2018-05-14 10:54 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Anders Roxell

When building video warnings pops up unused variable 'mdev',
drivers/staging/most/video/video.c: In function ‘vidioc_enum_fmt_vid_cap’:
drivers/staging/most/video/video.c:265:25: warning: unused variable ‘mdev’ [-Wunused-variable]
  struct most_video_dev *mdev = fh->mdev;
                         ^~~~
drivers/staging/most/video/video.c: In function ‘vidioc_g_fmt_vid_cap’:
drivers/staging/most/video/video.c:282:25: warning: unused variable ‘mdev’ [-Wunused-variable]
  struct most_video_dev *mdev = fh->mdev;
                         ^~~~
drivers/staging/most/video/video.c: In function ‘vidioc_g_std’:
drivers/staging/most/video/video.c:309:25: warning: unused variable ‘mdev’ [-Wunused-variable]
  struct most_video_dev *mdev = fh->mdev;
                         ^~~~

Remove the 'mdev' declaration.

Fixes: 7d7cdb4fa552 ("staging: most: video: remove debugging code")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/staging/most/video/video.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index fc374711fcc0..cf342eb58e10 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -261,9 +261,6 @@ static int vidioc_querycap(struct file *file, void *priv,
 static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
 				   struct v4l2_fmtdesc *f)
 {
-	struct comp_fh *fh = priv;
-	struct most_video_dev *mdev = fh->mdev;
-
 	if (f->index)
 		return -EINVAL;
 
@@ -278,9 +275,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
 static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
 				struct v4l2_format *f)
 {
-	struct comp_fh *fh = priv;
-	struct most_video_dev *mdev = fh->mdev;
-
 	comp_set_format_struct(f);
 	return 0;
 }
@@ -305,9 +299,6 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
 
 static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
 {
-	struct comp_fh *fh = priv;
-	struct most_video_dev *mdev = fh->mdev;
-
 	*norm = V4L2_STD_UNKNOWN;
 	return 0;
 }
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: video: fix warning unused variable
  2018-05-14 10:54 [PATCH] staging: video: fix warning unused variable Anders Roxell
@ 2018-05-14 11:01 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-05-14 11:01 UTC (permalink / raw)
  To: Anders Roxell; +Cc: devel, linux-kernel

On Mon, May 14, 2018 at 12:54:42PM +0200, Anders Roxell wrote:
> When building video warnings pops up unused variable 'mdev',
> drivers/staging/most/video/video.c: In function ‘vidioc_enum_fmt_vid_cap’:
> drivers/staging/most/video/video.c:265:25: warning: unused variable ‘mdev’ [-Wunused-variable]
>   struct most_video_dev *mdev = fh->mdev;
>                          ^~~~
> drivers/staging/most/video/video.c: In function ‘vidioc_g_fmt_vid_cap’:
> drivers/staging/most/video/video.c:282:25: warning: unused variable ‘mdev’ [-Wunused-variable]
>   struct most_video_dev *mdev = fh->mdev;
>                          ^~~~
> drivers/staging/most/video/video.c: In function ‘vidioc_g_std’:
> drivers/staging/most/video/video.c:309:25: warning: unused variable ‘mdev’ [-Wunused-variable]
>   struct most_video_dev *mdev = fh->mdev;
>                          ^~~~
> 
> Remove the 'mdev' declaration.
> 
> Fixes: 7d7cdb4fa552 ("staging: most: video: remove debugging code")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  drivers/staging/most/video/video.c | 9 ---------
>  1 file changed, 9 deletions(-)

I posted the same exact fix about an hour ago, sorry.

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-14 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 10:54 [PATCH] staging: video: fix warning unused variable Anders Roxell
2018-05-14 11:01 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).