mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/13] Sparse fixes
@ 2011-11-15  7:53 Felipe Balbi
  2011-11-15  7:53 ` [PATCH 01/13] usb: storage: alauda: fix sparse warnings Felipe Balbi
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Hi Greg,

Here are a few sparse fixups for the storage drivers.
Compile tested with allyesconfig and allmodconfig.

Felipe Balbi (13):
  usb: storage: alauda: fix sparse warnings
  usb: storage: cypress: fix sparse warning
  usb: storage: datafab: fix sparse warning
  usb: storage: ene_ub6250: fix sparse warnings
  usb: storage: freecom: fix sparse warning
  usb: storage: isd200: fix sparse warning
  usb: storage: jumpshot: fix sparse warning
  usb: storage: karma: fix sparse warning
  usb: storage: onetouch: fix sparse warning
  usb: storagE: realtek_cr: fix sparse warnings
  usb: storage: sddr09: fix sparse warning
  usb: storage: sddr55: fix sparse warning
  usb: storage: shuttle_usbat: fix sparse warning

 drivers/usb/storage/alauda.c        |    2 +-
 drivers/usb/storage/cypress_atacb.c |    2 +-
 drivers/usb/storage/datafab.c       |    2 +-
 drivers/usb/storage/ene_ub6250.c    |   12 ++++++------
 drivers/usb/storage/freecom.c       |    2 +-
 drivers/usb/storage/isd200.c        |    2 +-
 drivers/usb/storage/jumpshot.c      |    2 +-
 drivers/usb/storage/karma.c         |    2 +-
 drivers/usb/storage/onetouch.c      |    2 +-
 drivers/usb/storage/realtek_cr.c    |   11 +++++------
 drivers/usb/storage/sddr09.c        |    2 +-
 drivers/usb/storage/sddr55.c        |    2 +-
 drivers/usb/storage/shuttle_usbat.c |    2 +-
 13 files changed, 22 insertions(+), 23 deletions(-)

-- 
1.7.8.rc0


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

* [PATCH 01/13] usb: storage: alauda: fix sparse warnings
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 02/13] usb: storage: cypress: fix sparse warning Felipe Balbi
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following warning:

| drivers/usb/storage/alauda.c:142:22: warning: symbol
|	'alauda_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/alauda.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index 42d0eae..9ce3bba 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -139,7 +139,7 @@ static int init_alauda(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id alauda_usb_ids[] = {
+static struct usb_device_id alauda_usb_ids[] = {
 #	include "unusual_alauda.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 02/13] usb: storage: cypress: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
  2011-11-15  7:53 ` [PATCH 01/13] usb: storage: alauda: fix sparse warnings Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 03/13] usb: storage: datafab: " Felipe Balbi
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/cypress_atacb.c:46:22: warning:
|	symbol 'cypress_usb_ids' was not declared. Should
|	it be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/cypress_atacb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c
index c844718..740bfe6 100644
--- a/drivers/usb/storage/cypress_atacb.c
+++ b/drivers/usb/storage/cypress_atacb.c
@@ -43,7 +43,7 @@ MODULE_LICENSE("GPL");
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id cypress_usb_ids[] = {
+static struct usb_device_id cypress_usb_ids[] = {
 #	include "unusual_cypress.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 03/13] usb: storage: datafab: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
  2011-11-15  7:53 ` [PATCH 01/13] usb: storage: alauda: fix sparse warnings Felipe Balbi
  2011-11-15  7:53 ` [PATCH 02/13] usb: storage: cypress: fix sparse warning Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 04/13] usb: storage: ene_ub6250: fix sparse warnings Felipe Balbi
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/datafab.c:91:22: warning: symbol
|	'datafab_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/datafab.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
index ded836b..0d8d97c 100644
--- a/drivers/usb/storage/datafab.c
+++ b/drivers/usb/storage/datafab.c
@@ -88,7 +88,7 @@ static int datafab_determine_lun(struct us_data *us,
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id datafab_usb_ids[] = {
+static struct usb_device_id datafab_usb_ids[] = {
 #	include "unusual_datafab.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 04/13] usb: storage: ene_ub6250: fix sparse warnings
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (2 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 03/13] usb: storage: datafab: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 05/13] usb: storage: freecom: fix sparse warning Felipe Balbi
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warnings:

| drivers/usb/storage/ene_ub6250.c:45:22: warning: symbol
|	'ene_ub6250_usb_ids' was not declared. Should it
|	be static?
|
| drivers/usb/storage/ene_ub6250.c:780:5: warning: symbol
|	'ms_lib_alloc_logicalmap' was not declared. Should it
|	be static?
|
| drivers/usb/storage/ene_ub6250.c:2251:5: warning: symbol
|	'ms_scsi_irp' was not declared. Should it be static?
|
| drivers/usb/storage/ene_ub6250.c:638:29: warning: right shift by bigger
|	than source value
|
| drivers/usb/storage/ene_ub6250.c:639:29: warning: right shift by bigger
|	than source value

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/ene_ub6250.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index 9fbe742..b990726 100644
--- a/drivers/usb/storage/ene_ub6250.c
+++ b/drivers/usb/storage/ene_ub6250.c
@@ -42,7 +42,7 @@ MODULE_LICENSE("GPL");
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
 	.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id ene_ub6250_usb_ids[] = {
+static struct usb_device_id ene_ub6250_usb_ids[] = {
 #	include "unusual_ene_ub6250.h"
 	{ }		/* Terminating entry */
 };
@@ -607,8 +607,8 @@ static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb)
 
 static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb)
 {
-	u32   bl_num;
-	u16    bl_len;
+	u32	bl_num;
+	u32	bl_len;
 	unsigned int offset = 0;
 	unsigned char    buf[8];
 	struct scatterlist *sg = NULL;
@@ -622,7 +622,7 @@ static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb)
 		else
 			bl_num = (info->HC_C_SIZE + 1) * 1024 - 1;
 	} else {
-		bl_len = 1<<(info->SD_READ_BL_LEN);
+		bl_len = 1 << (info->SD_READ_BL_LEN);
 		bl_num = info->SD_Block_Mult * (info->SD_C_SIZE + 1)
 				* (1 << (info->SD_C_SIZE_MULT + 2)) - 1;
 	}
@@ -777,7 +777,7 @@ static int ms_lib_free_logicalmap(struct us_data *us)
 	return 0;
 }
 
-int ms_lib_alloc_logicalmap(struct us_data *us)
+static int ms_lib_alloc_logicalmap(struct us_data *us)
 {
 	u32  i;
 	struct ene_ub6250_info *info = (struct ene_ub6250_info *) us->extra;
@@ -2248,7 +2248,7 @@ static int sd_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
 /*
  * ms_scsi_irp()
  */
-int ms_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
+static int ms_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
 {
 	int result;
 	struct ene_ub6250_info *info = (struct ene_ub6250_info *)us->extra;
-- 
1.7.8.rc0


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

* [PATCH 05/13] usb: storage: freecom: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (3 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 04/13] usb: storage: ene_ub6250: fix sparse warnings Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 06/13] usb: storage: isd200: " Felipe Balbi
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/freecom.c:122:22: warning: symbol
|	'freecom_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/freecom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
index 6542ca4..8cf16f8 100644
--- a/drivers/usb/storage/freecom.c
+++ b/drivers/usb/storage/freecom.c
@@ -119,7 +119,7 @@ static int init_freecom(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id freecom_usb_ids[] = {
+static struct usb_device_id freecom_usb_ids[] = {
 #	include "unusual_freecom.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 06/13] usb: storage: isd200: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (4 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 05/13] usb: storage: freecom: fix sparse warning Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 07/13] usb: storage: jumpshot: " Felipe Balbi
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/freecom.c:122:22: warning: symbol
|	'freecom_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/isd200.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index ffc4193..7b81303 100644
--- a/drivers/usb/storage/isd200.c
+++ b/drivers/usb/storage/isd200.c
@@ -76,7 +76,7 @@ static int isd200_Initialization(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id isd200_usb_ids[] = {
+static struct usb_device_id isd200_usb_ids[] = {
 #	include "unusual_isd200.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 07/13] usb: storage: jumpshot: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (5 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 06/13] usb: storage: isd200: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 08/13] usb: storage: karma: " Felipe Balbi
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/jumpshot.c:74:22: warning: symbol
|	'jumpshot_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/jumpshot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
index 6168596..5ef55c7 100644
--- a/drivers/usb/storage/jumpshot.c
+++ b/drivers/usb/storage/jumpshot.c
@@ -71,7 +71,7 @@ MODULE_LICENSE("GPL");
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id jumpshot_usb_ids[] = {
+static struct usb_device_id jumpshot_usb_ids[] = {
 #	include "unusual_jumpshot.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 08/13] usb: storage: karma: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (6 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 07/13] usb: storage: jumpshot: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 09/13] usb: storage: onetouch: " Felipe Balbi
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/karma.c:62:22: warning: symbol
|	'karma_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/karma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/karma.c b/drivers/usb/storage/karma.c
index ba1b789..fb5bfb0 100644
--- a/drivers/usb/storage/karma.c
+++ b/drivers/usb/storage/karma.c
@@ -59,7 +59,7 @@ static int rio_karma_init(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id karma_usb_ids[] = {
+static struct usb_device_id karma_usb_ids[] = {
 #	include "unusual_karma.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 09/13] usb: storage: onetouch: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (7 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 08/13] usb: storage: karma: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 10/13] usb: storagE: realtek_cr: fix sparse warnings Felipe Balbi
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/onetouch.c:72:22: warning: symbol
|	'onetouch_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/onetouch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 1943be5..d29be3e 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -69,7 +69,7 @@ struct usb_onetouch {
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id onetouch_usb_ids[] = {
+static struct usb_device_id onetouch_usb_ids[] = {
 #	include "unusual_onetouch.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 10/13] usb: storagE: realtek_cr: fix sparse warnings
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (8 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 09/13] usb: storage: onetouch: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 11/13] usb: storage: sddr09: fix sparse warning Felipe Balbi
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warnings:

| drivers/usb/storage/realtek_cr.c:821:6: warning: symbol
|	'rts51x_invoke_transport' was not declared. Should
|	it be static?
|
| drivers/usb/storage/realtek_cr.c:980:5: warning: symbol
|	'realtek_cr_suspend' was not declared. Should it
|	be static?
|
| drivers/usb/storage/realtek_cr.c:518:23: warning: cast
|	truncates bits from constant value (fe47 becomes 47)

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/realtek_cr.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
index 0ce5f79..30f64bf 100644
--- a/drivers/usb/storage/realtek_cr.c
+++ b/drivers/usb/storage/realtek_cr.c
@@ -507,15 +507,14 @@ static int enable_oscillator(struct us_data *us)
 static int __do_config_autodelink(struct us_data *us, u8 *data, u16 len)
 {
 	int retval;
-	u16 addr = 0xFE47;
 	u8 cmnd[12] = {0};
 
-	US_DEBUGP("%s, addr = 0x%x, len = %d\n", __FUNCTION__, addr, len);
+	US_DEBUGP("%s, addr = 0xfe47, len = %d\n", __FUNCTION__, len);
 
 	cmnd[0] = 0xF0;
 	cmnd[1] = 0x0E;
-	cmnd[2] = (u8)(addr >> 8);
-	cmnd[3] = (u8)addr;
+	cmnd[2] = 0xfe;
+	cmnd[3] = 0x47;
 	cmnd[4] = (u8)(len >> 8);
 	cmnd[5] = (u8)len;
 
@@ -818,7 +817,7 @@ static inline int working_scsi(struct scsi_cmnd *srb)
 	return 1;
 }
 
-void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
+static void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
 {
 	struct rts51x_chip *chip = (struct rts51x_chip *)(us->extra);
 	static int card_first_show = 1;
@@ -977,7 +976,7 @@ static void realtek_cr_destructor(void *extra)
 }
 
 #ifdef CONFIG_PM
-int realtek_cr_suspend(struct usb_interface *iface, pm_message_t message)
+static int realtek_cr_suspend(struct usb_interface *iface, pm_message_t message)
 {
 	struct us_data *us = usb_get_intfdata(iface);
 
-- 
1.7.8.rc0


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

* [PATCH 11/13] usb: storage: sddr09: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (9 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 10/13] usb: storagE: realtek_cr: fix sparse warnings Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 12/13] usb: storage: sddr55: " Felipe Balbi
  2011-11-15  7:53 ` [PATCH 13/13] usb: storage: shuttle_usbat: " Felipe Balbi
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/sddr09.c:74:22: warning: symbol
|	'sddr09_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/sddr09.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index bcb9a70..6ecbf44 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -71,7 +71,7 @@ static int usb_stor_sddr09_init(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id sddr09_usb_ids[] = {
+static struct usb_device_id sddr09_usb_ids[] = {
 #	include "unusual_sddr09.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 12/13] usb: storage: sddr55: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (10 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 11/13] usb: storage: sddr09: fix sparse warning Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  2011-11-15  7:53 ` [PATCH 13/13] usb: storage: shuttle_usbat: " Felipe Balbi
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/sddr55.c:51:22: warning: symbol
|	'sddr55_usb_ids' was not declared. Should it
|	be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/sddr55.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
index 44dfed7..f293044 100644
--- a/drivers/usb/storage/sddr55.c
+++ b/drivers/usb/storage/sddr55.c
@@ -48,7 +48,7 @@ MODULE_LICENSE("GPL");
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id sddr55_usb_ids[] = {
+static struct usb_device_id sddr55_usb_ids[] = {
 #	include "unusual_sddr55.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

* [PATCH 13/13] usb: storage: shuttle_usbat: fix sparse warning
  2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
                   ` (11 preceding siblings ...)
  2011-11-15  7:53 ` [PATCH 12/13] usb: storage: sddr55: " Felipe Balbi
@ 2011-11-15  7:53 ` Felipe Balbi
  12 siblings, 0 replies; 14+ messages in thread
From: Felipe Balbi @ 2011-11-15  7:53 UTC (permalink / raw)
  To: Greg KH
  Cc: Matthew Dharm, usb-storage, Linux USB Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Fix the following sparse warning:

| drivers/usb/storage/shuttle_usbat.c:173:22: warning:
|	symbol 'usbat_usb_ids' was not declared. Should
|	it be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/shuttle_usbat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
index 0b00091..7d642c8 100644
--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -170,7 +170,7 @@ static int init_usbat_flash(struct us_data *us);
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
   .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id usbat_usb_ids[] = {
+static struct usb_device_id usbat_usb_ids[] = {
 #	include "unusual_usbat.h"
 	{ }		/* Terminating entry */
 };
-- 
1.7.8.rc0


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

end of thread, other threads:[~2011-11-15  7:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
2011-11-15  7:53 ` [PATCH 01/13] usb: storage: alauda: fix sparse warnings Felipe Balbi
2011-11-15  7:53 ` [PATCH 02/13] usb: storage: cypress: fix sparse warning Felipe Balbi
2011-11-15  7:53 ` [PATCH 03/13] usb: storage: datafab: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 04/13] usb: storage: ene_ub6250: fix sparse warnings Felipe Balbi
2011-11-15  7:53 ` [PATCH 05/13] usb: storage: freecom: fix sparse warning Felipe Balbi
2011-11-15  7:53 ` [PATCH 06/13] usb: storage: isd200: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 07/13] usb: storage: jumpshot: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 08/13] usb: storage: karma: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 09/13] usb: storage: onetouch: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 10/13] usb: storagE: realtek_cr: fix sparse warnings Felipe Balbi
2011-11-15  7:53 ` [PATCH 11/13] usb: storage: sddr09: fix sparse warning Felipe Balbi
2011-11-15  7:53 ` [PATCH 12/13] usb: storage: sddr55: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 13/13] usb: storage: shuttle_usbat: " Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®