Patchwork [1/2] bluetooth/bt3c: eliminate a sparse warning

login
register
mail settings
Submitter Andrew Morton
Date Feb. 11, 2009, 9:28 p.m.
Message ID <200902112128.n1BLSBnP000351@imap1.linux-foundation.org>
Download mbox | patch
Permalink /patch/22959/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Andrew Morton - Feb. 11, 2009, 9:28 p.m.
From: Andre Haupt <andre@bitwigglers.org>

This eliminates a sparse warning that symbol 'stat' shadows an earlier one.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/bluetooth/bt3c_cs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Marcel Holtmann - Feb. 12, 2009, 1:52 a.m.
Hi Andrew,

> This eliminates a sparse warning that symbol 'stat' shadows an earlier one.
> 
> Signed-off-by: Andre Haupt <andre@bitwigglers.org>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Dave Young <hidave.darkstar@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

already part of my bluetooth-testing.git tree.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -puN drivers/bluetooth/bt3c_cs.c~bluetooth-bt3c-eliminate-a-sparse-warning drivers/bluetooth/bt3c_cs.c
--- a/drivers/bluetooth/bt3c_cs.c~bluetooth-bt3c-eliminate-a-sparse-warning
+++ a/drivers/bluetooth/bt3c_cs.c
@@ -359,9 +359,9 @@  static irqreturn_t bt3c_interrupt(int ir
 			BT_ERR("Very strange (stat=0x%04x)", stat);
 		} else if ((stat & 0xff) != 0xff) {
 			if (stat & 0x0020) {
-				int stat = bt3c_read(iobase, 0x7002) & 0x10;
+				int status = bt3c_read(iobase, 0x7002) & 0x10;
 				BT_INFO("%s: Antenna %s", info->hdev->name,
-							stat ? "out" : "in");
+							status ? "out" : "in");
 			}
 			if (stat & 0x0001)
 				bt3c_receive(info);