Skip to contentSkip to conversation

Patch "[media] gspca: avoid unused variable warnings" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Oct 5, 2016

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

[media] gspca: avoid unused variable warnings

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
gspca-avoid-unused-variable-warnings.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From d7e92e15e92fc987640772bf110586898b5f15aa Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Mon, 4 Jul 2016 10:21:40 -0300
Subject: [media] gspca: avoid unused variable warnings

From: Arnd Bergmann <[email protected]>

commit d7e92e15e92fc987640772bf110586898b5f15aa upstream.

When CONFIG_INPUT is disabled, multiple gspca backend drivers print compile-time warnings about unused variables:

media/usb/gspca/cpia1.c: In function 'sd_stopN':
media/usb/gspca/cpia1.c:1627:13: error: unused variable 'sd' [-Werror=unused-variable] media/usb/gspca/konica.c: In function 'sd_stopN':
media/usb/gspca/konica.c:246:13: error: unused variable 'sd' [-Werror=unused-variable]

This annotates the variables as __maybe_unused, to let the compiler know that they are declared intentionally.

Fixes ee186fd96a5f ("[media] gscpa_t613: Add support for the camera button")
Fixes c2f644aeeba3 ("[media] gspca_cpia1: Add support for button")
Fixes b517af722860 ("V4L/DVB: gspca_konica: New gspca subdriver for konica chipset using cams")
---
 drivers/media/usb/gspca/cpia1.c  |    2 +-
 drivers/media/usb/gspca/konica.c |    2 +-
 drivers/media/usb/gspca/t613.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/usb/gspca/cpia1.c +1 -1
@@ -1624,7 +1624,7 @@ static int sd_start(struct gspca_dev *gs
 
 static void sd_stopN(struct gspca_dev *gspca_dev)
 {
-	struct sd *sd = (struct sd *) gspca_dev;
+	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
 
 	command_pause(gspca_dev);
 
drivers/media/usb/gspca/konica.c +1 -1
@@ -243,7 +243,7 @@ static int sd_start(struct gspca_dev *gs
 
 static void sd_stopN(struct gspca_dev *gspca_dev)
 {
-	struct sd *sd = (struct sd *) gspca_dev;
+	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
 
 	konica_stream_off(gspca_dev);
 #if IS_ENABLED(CONFIG_INPUT)
drivers/media/usb/gspca/t613.c +1 -1
@@ -837,7 +837,7 @@ static void sd_pkt_scan(struct gspca_dev
 			u8 *data,			/* isoc packet */
 			int len)			/* iso packet length */
 {
-	struct sd *sd = (struct sd *) gspca_dev;
+	struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
 	int pkt_type;
 
 	if (data[0] == 0x5a) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/gspca-avoid-unused-variable-warnings.patch queue-4.4/arm-8617-1-dma-fix-dma_max_pfn.patch