Skip to contentSkip to conversation

media: remove unused variable that causes a warning

PATCH In review Kevin Hilman 2 participants 3 messages Aug 24, 2015 – Aug 25, 2015 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: remove unused variable that causes a warning

From: Linus Torvalds <[email protected]>

My 'allmodconfig' build is _almost_ free of warnings, and most of the remaining ones are for legacy drivers that just do bad things that I can't find it in my black heart to care too much about. But this one was just annoying me:

drivers/media/v4l2-core/videobuf2-core.c:3256:26: warning: unused variable ‘fileio’ [-Wunused-variable]

because commit 0e661006370b ("[media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop()") removed all users of 'fileio' and instead calls "__vb2_cleanup_fileio(q)" to clean up q->fileio. But the now unused 'fileio' variable was left around.

(cherry picked from commit 1d11437f4fd02f9b5d3749675a1232216787dcc6)
Cc <[email protected]> # v3.18+
---
 drivers/media/v4l2-core/videobuf2-core.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/v4l2-core/videobuf2-core.c +0 -1
index f2e43de3dd87..5c1977933c4d 100644
@@ -3222,7 +3222,6 @@ EXPORT_SYMBOL_GPL(vb2_thread_start);
 int vb2_thread_stop(struct vb2_queue *q)
 {
 	struct vb2_threadio_data *threadio = q->threadio;
-	struct vb2_fileio_data *fileio = q->fileio;
 	int err;
 
 	if (threadio == NULL)
Signature · 1 line
2.4.5
#1 lore raw
Quoted 14 lines · Kevin Hilman

From: Linus Torvalds <[email protected]>

My 'allmodconfig' build is _almost_ free of warnings, and most of the remaining ones are for legacy drivers that just do bad things that I can't find it in my black heart to care too much about. But this one was just annoying me:

drivers/media/v4l2-core/videobuf2-core.c:3256:26: warning: unused variable ‘fileio’ [-Wunused-variable]

because commit 0e661006370b ("[media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop()") removed all users of 'fileio' and instead calls "__vb2_cleanup_fileio(q)" to clean up q->fileio. But the now unused 'fileio' variable was left around.

Quoted 4 lines
(cherry picked from commit 1d11437f4fd02f9b5d3749675a1232216787dcc6)
Cc <[email protected]> # v3.18+

Hey Kevin,

I'm afraid this isn't -stable material: it doesn't fix and actual problem that bothers users, so I can't take it.

Thanks,
Sasha

#2 lore raw
Quoted 20 lines · Sasha Levin
Quoted 14 lines · Kevin Hilman

From: Linus Torvalds <[email protected]>

My 'allmodconfig' build is _almost_ free of warnings, and most of the remaining ones are for legacy drivers that just do bad things that I can't find it in my black heart to care too much about. But this one was just annoying me:

drivers/media/v4l2-core/videobuf2-core.c:3256:26: warning: unused variable ‘fileio’ [-Wunused-variable]

because commit 0e661006370b ("[media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop()") removed all users of 'fileio' and instead calls "__vb2_cleanup_fileio(q)" to clean up q->fileio. But the now unused 'fileio' variable was left around.

Quoted 4 lines
(cherry picked from commit 1d11437f4fd02f9b5d3749675a1232216787dcc6)
Cc <[email protected]> # v3.18+
Quoted 4 lines

Hey Kevin,

I'm afraid this isn't -stable material: it doesn't fix and actual problem that bothers users, so I can't take it.

OK, no worries. I wasn't clear if trival build fixes qualified.

Thanks,

Kevin