From: Greg Kroah-Hartman Date: Mon, 26 Nov 2012 21:21:43 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.6.9~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8910716529f3fa07416e7938024208aa32370506;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: alsa-snd-usb-caiaq-initialize-card-pointer.patch bluetooth-fix-using-uninitialized-option-in-rfcmode.patch drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch mvsas-remove-unused-variable-in-mvs_task_exec.patch nvme-fix-uninitialized-iod-compiler-warning.patch rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch ubifs-fix-compilation-warning.patch --- diff --git a/queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch b/queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch new file mode 100644 index 00000000000..ac60c90e5ad --- /dev/null +++ b/queue-3.4/alsa-snd-usb-caiaq-initialize-card-pointer.patch @@ -0,0 +1,35 @@ +From da185443c12f5ef7416af50293833a5654854186 Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Mon, 18 Jun 2012 21:16:31 +0200 +Subject: ALSA: snd-usb-caiaq: initialize card pointer + +From: Daniel Mack + +commit da185443c12f5ef7416af50293833a5654854186 upstream. + +Fixes the following warning: + + CC [M] sound/usb/caiaq/device.o +sound/usb/caiaq/device.c: In function ‘snd_probe’: +sound/usb/caiaq/device.c:500:16: warning: ‘card’ may be used +uninitialized in this function [-Wmaybe-uninitialized] + +Signed-off-by: Daniel Mack +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/caiaq/device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/usb/caiaq/device.c ++++ b/sound/usb/caiaq/device.c +@@ -485,7 +485,7 @@ static int __devinit snd_probe(struct us + const struct usb_device_id *id) + { + int ret; +- struct snd_card *card; ++ struct snd_card *card = NULL; + struct usb_device *device = interface_to_usbdev(intf); + + ret = create_card(device, intf, &card); diff --git a/queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch b/queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch new file mode 100644 index 00000000000..ae69a08c2d4 --- /dev/null +++ b/queue-3.4/bluetooth-fix-using-uninitialized-option-in-rfcmode.patch @@ -0,0 +1,56 @@ +From 8f321f853ea33330c7141977cd34804476e2e07e Mon Sep 17 00:00:00 2001 +From: Szymon Janc +Date: Fri, 8 Jun 2012 11:33:33 +0200 +Subject: Bluetooth: Fix using uninitialized option in RFCMode + +From: Szymon Janc + +commit 8f321f853ea33330c7141977cd34804476e2e07e upstream. + +If remote device sends bogus RFC option with invalid length, +undefined options values are used. Fix this by using defaults when +remote misbehaves. + +This also fixes the following warning reported by gcc 4.7.0: + +net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp': +net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized] +net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here +net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized] +net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here +net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized] +net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here +net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized] +net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here + +Signed-off-by: Szymon Janc +Signed-off-by: Gustavo Padovan +Signed-off-by: Greg Kroah-Hartman + +--- + net/bluetooth/l2cap_core.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/net/bluetooth/l2cap_core.c ++++ b/net/bluetooth/l2cap_core.c +@@ -2585,12 +2585,14 @@ static void l2cap_conf_rfc_get(struct l2 + while (len >= L2CAP_CONF_OPT_SIZE) { + len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); + +- switch (type) { +- case L2CAP_CONF_RFC: +- if (olen == sizeof(rfc)) +- memcpy(&rfc, (void *)val, olen); +- goto done; +- } ++ if (type != L2CAP_CONF_RFC) ++ continue; ++ ++ if (olen != sizeof(rfc)) ++ break; ++ ++ memcpy(&rfc, (void *)val, olen); ++ goto done; + } + + /* Use sane default values in case a misbehaving remote device diff --git a/queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch b/queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch new file mode 100644 index 00000000000..8b4823fb912 --- /dev/null +++ b/queue-3.4/drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch @@ -0,0 +1,70 @@ +From 5bc9ad774c063f6b41965e7314f2c26aa5e465a0 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Tue, 29 May 2012 15:07:26 -0700 +Subject: drivers/leds/leds-lp5521.c: fix lp5521_read() error handling + +From: Dan Carpenter + +commit 5bc9ad774c063f6b41965e7314f2c26aa5e465a0 upstream. + +Gcc 4.6.2 complains that: + + drivers/leds/leds-lp5521.c: In function `lp5521_load_program': + drivers/leds/leds-lp5521.c:214:21: warning: `mode' may be used uninitialized in this function [-Wuninitialized] + drivers/leds/leds-lp5521.c: In function `lp5521_probe': + drivers/leds/leds-lp5521.c:788:5: warning: `buf' may be used uninitialized in this function [-Wuninitialized] + drivers/leds/leds-lp5521.c:740:6: warning: `ret' may be used uninitialized in this function [-Wuninitialized] + +These are real problems if lp5521_read() returns an error. When that +happens we should handle it, instead of ignoring it or doing a bitwise +OR with all the other error codes and continuing. + +Signed-off-by: Dan Carpenter +Cc: Milo +Cc: Richard Purdie +Cc: Bryan Wu +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/leds/leds-lp5521.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/leds/leds-lp5521.c ++++ b/drivers/leds/leds-lp5521.c +@@ -193,9 +193,14 @@ static int lp5521_load_program(struct lp + + /* move current engine to direct mode and remember the state */ + ret = lp5521_set_engine_mode(eng, LP5521_CMD_DIRECT); ++ if (ret) ++ return ret; ++ + /* Mode change requires min 500 us delay. 1 - 2 ms with margin */ + usleep_range(1000, 2000); +- ret |= lp5521_read(client, LP5521_REG_OP_MODE, &mode); ++ ret = lp5521_read(client, LP5521_REG_OP_MODE, &mode); ++ if (ret) ++ return ret; + + /* For loading, all the engines to load mode */ + lp5521_write(client, LP5521_REG_OP_MODE, LP5521_CMD_DIRECT); +@@ -211,8 +216,7 @@ static int lp5521_load_program(struct lp + LP5521_PROG_MEM_SIZE, + pattern); + +- ret |= lp5521_write(client, LP5521_REG_OP_MODE, mode); +- return ret; ++ return lp5521_write(client, LP5521_REG_OP_MODE, mode); + } + + static int lp5521_set_led_current(struct lp5521_chip *chip, int led, u8 curr) +@@ -785,7 +789,7 @@ static int __devinit lp5521_probe(struct + * LP5521_REG_ENABLE register will not have any effect - strange! + */ + ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf); +- if (buf != LP5521_REG_R_CURR_DEFAULT) { ++ if (ret || buf != LP5521_REG_R_CURR_DEFAULT) { + dev_err(&client->dev, "error in resetting chip\n"); + goto fail2; + } diff --git a/queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch b/queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch new file mode 100644 index 00000000000..36ffdabf1f0 --- /dev/null +++ b/queue-3.4/mvsas-remove-unused-variable-in-mvs_task_exec.patch @@ -0,0 +1,33 @@ +From cca85013ef54f66eb4616e6f3860549a96c8338b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 21 Jun 2012 23:36:35 -0700 +Subject: [SCSI] mvsas: remove unused variable in mvs_task_exec() + +From: Dan Carpenter + +commit cca85013ef54f66eb4616e6f3860549a96c8338b upstream. + +We don't use "dev" any more after 07ec747a5f ("libsas: remove +ata_port.lock management duties from lldds") and it causes a compile +warning. + +Signed-off-by: Dan Carpenter +Cc: Xiangliang Yu +Signed-off-by: Dan Williams +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mvsas/mv_sas.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/scsi/mvsas/mv_sas.c ++++ b/drivers/scsi/mvsas/mv_sas.c +@@ -885,7 +885,6 @@ static int mvs_task_exec(struct sas_task + struct completion *completion, int is_tmf, + struct mvs_tmf_task *tmf) + { +- struct domain_device *dev = task->dev; + struct mvs_info *mvi = NULL; + u32 rc = 0; + u32 pass = 0; diff --git a/queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch b/queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch new file mode 100644 index 00000000000..c9f6c3ee177 --- /dev/null +++ b/queue-3.4/nvme-fix-uninitialized-iod-compiler-warning.patch @@ -0,0 +1,28 @@ +From c7d36ab8fa04c213328119a9c0d66985fe204ee5 Mon Sep 17 00:00:00 2001 +From: Keith Busch +Date: Fri, 27 Jul 2012 11:53:28 -0600 +Subject: NVMe: Fix uninitialized iod compiler warning + +From: Keith Busch + +commit c7d36ab8fa04c213328119a9c0d66985fe204ee5 upstream. + +Signed-off-by: Keith Busch +Signed-off-by: Matthew Wilcox +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/nvme.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/block/nvme.c ++++ b/drivers/block/nvme.c +@@ -1153,7 +1153,7 @@ static int nvme_user_admin_cmd(struct nv + struct nvme_admin_cmd cmd; + struct nvme_command c; + int status, length; +- struct nvme_iod *iod; ++ struct nvme_iod *uninitialized_var(iod); + + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; diff --git a/queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch b/queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch new file mode 100644 index 00000000000..6757f96c1e5 --- /dev/null +++ b/queue-3.4/rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch @@ -0,0 +1,36 @@ +From f761b6947dde42890beea59b020e1be87491809e Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Wed, 20 Jun 2012 11:47:26 -0500 +Subject: rtlwifi: rtl8192se: Fix gcc 4.7.x warning + +From: Larry Finger + +commit f761b6947dde42890beea59b020e1be87491809e upstream. + +With gcc 4.7.x, the following warning is issued as the routine that sets +the array has the possibility of not initializing the values: + + CC [M] drivers/net/wireless/rtlwifi/rtl8192se/phy.o +drivers/net/wireless/rtlwifi/rtl8192se/phy.c: In function ‘rtl92s_phy_set_txpower’: +drivers/net/wireless/rtlwifi/rtl8192se/phy.c:1268:23: warning: ‘ofdmpowerLevel[0]’ may be used uninitialized in this function [-Wuninitialized] + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c +@@ -1247,6 +1247,9 @@ static void _rtl92s_phy_get_txpower_inde + /* Read HT 40 OFDM TX power */ + ofdmpowerLevel[0] = rtlefuse->txpwrlevel_ht40_2s[0][index]; + ofdmpowerLevel[1] = rtlefuse->txpwrlevel_ht40_2s[1][index]; ++ } else { ++ ofdmpowerLevel[0] = 0; ++ ofdmpowerLevel[1] = 0; + } + } + diff --git a/queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch b/queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch new file mode 100644 index 00000000000..1f00b42350a --- /dev/null +++ b/queue-3.4/scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch @@ -0,0 +1,36 @@ +From b631cf1f899f9d2e449884dbccc34940637c639f Mon Sep 17 00:00:00 2001 +From: Krzysztof Wilczynski +Date: Wed, 2 May 2012 11:34:01 +0100 +Subject: scsi: aha152x: Fix sparse warning and make printing pointer address more portable. + +From: Krzysztof Wilczynski + +commit b631cf1f899f9d2e449884dbccc34940637c639f upstream. + +This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt, +which also takes care about the following warning during compilation time: + + drivers/scsi/aha152x.c: In function ‘get_command’: + drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of different size + +Signed-off-by: Krzysztof Wilczynski +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/aha152x.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/aha152x.c ++++ b/drivers/scsi/aha152x.c +@@ -2984,8 +2984,8 @@ static int get_command(char *pos, Scsi_C + char *start = pos; + int i; + +- SPRINTF("0x%08x: target=%d; lun=%d; cmnd=( ", +- (unsigned int) ptr, ptr->device->id, ptr->device->lun); ++ SPRINTF("%p: target=%d; lun=%d; cmnd=( ", ++ ptr, ptr->device->id, ptr->device->lun); + + for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++) + SPRINTF("0x%02x ", ptr->cmnd[i]); diff --git a/queue-3.4/series b/queue-3.4/series new file mode 100644 index 00000000000..b86f4413395 --- /dev/null +++ b/queue-3.4/series @@ -0,0 +1,8 @@ +ubifs-fix-compilation-warning.patch +nvme-fix-uninitialized-iod-compiler-warning.patch +bluetooth-fix-using-uninitialized-option-in-rfcmode.patch +alsa-snd-usb-caiaq-initialize-card-pointer.patch +drivers-leds-leds-lp5521.c-fix-lp5521_read-error-handling.patch +mvsas-remove-unused-variable-in-mvs_task_exec.patch +scsi-aha152x-fix-sparse-warning-and-make-printing-pointer-address-more-portable.patch +rtlwifi-rtl8192se-fix-gcc-4.7.x-warning.patch diff --git a/queue-3.4/ubifs-fix-compilation-warning.patch b/queue-3.4/ubifs-fix-compilation-warning.patch new file mode 100644 index 00000000000..9e2e6502326 --- /dev/null +++ b/queue-3.4/ubifs-fix-compilation-warning.patch @@ -0,0 +1,38 @@ +From 782759b9f5f5223e0962af60c3457c912fab755f Mon Sep 17 00:00:00 2001 +From: Alexandre Pereira da Silva +Date: Mon, 25 Jun 2012 17:47:49 -0300 +Subject: UBIFS: fix compilation warning + +From: Alexandre Pereira da Silva + +commit 782759b9f5f5223e0962af60c3457c912fab755f upstream. + +Fix the following compilation warning: + +fs/ubifs/dir.c: In function 'ubifs_rename': +fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized +in this function + +Use the 'uninitialized_var()' macro to get rid of this false-positive. + +Artem: massaged the patch a bit. + +Signed-off-by: Alexandre Pereira da Silva +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ubifs/dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/ubifs/dir.c ++++ b/fs/ubifs/dir.c +@@ -977,7 +977,7 @@ static int ubifs_rename(struct inode *ol + struct ubifs_budget_req ino_req = { .dirtied_ino = 1, + .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) }; + struct timespec time; +- unsigned int saved_nlink; ++ unsigned int uninitialized_var(saved_nlink); + + /* + * Budget request settings: deletion direntry, new direntry, removing