usb/storage/initializers.c: fix signedness difference
Subsystems (2)
PATCH 1/1 usb/storage/initializers.c: fix signedness difference
usb/storage/initializers.c: fix signedness difference
--- drivers/usb/storage/initializers.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/usb/storage/initializers.c +2 -1
@@ -66,7 +66,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us) {struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *) us->iobuf; -int res, partial; +int res; +unsigned int partial;static char init_string[] ="\xec\x0a\x06\x00$PCCHIPS" ;US_DEBUGP ("Sending UCR-61S2B initialization packet...\n" );
Quoted 12 lines · On Sun, 9 Dec 2007 22:23:42 +0100 Marcin __lusarz <[email protected]>…
usb/storage/initializers.c: fix signedness differenceSigned-off-by Marcin __lusarz <[email protected]>--- drivers/usb/storage/initializers.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/usb/storage/initializers.c +0
-0
drivers/usb/storage/initializers.c int usb_stor_ucr61s2b_init(struct us_data *us) · line 73
Quoted 9 lines
drivers/usb/storage/initializers.c +2
-1@@ -66,7 +66,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us) {struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *) us->iobuf; -int res, partial; +int res; +unsigned int partial;static char init_string[] ="\xec\x0a\x06\x00$PCCHIPS" ;US_DEBUGP ("Sending UCR-61S2B initialization packet...\n" );
Often we just wouldn't bother about something this minor.
But I see later on that we pass the address of `partial' into some other function and I am guessing that this produces some warning with some tool which you didn't tell us about?
Quoted 23 lines · Andrew Morton
Quoted 20 lines · On Sun, 9 Dec 2007 22:23:42 +0100 Marcin __lusarz <[email protected]>…
usb/storage/initializers.c: fix signedness differenceSigned-off-by Marcin __lusarz <[email protected]>--- drivers/usb/storage/initializers.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/usb/storage/initializers.c +2
-1@@ -66,7 +66,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us) {struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *) us->iobuf; -int res, partial; +int res; +unsigned int partial;static char init_string[] ="\xec\x0a\x06\x00$PCCHIPS" ;
Quoted 7 lines
drivers/usb/storage/initializers.c int usb_stor_ucr61s2b_init(struct us_data *us) · line 73
Quoted 1 line
drivers/usb/storage/initializers.c +0
-0US_DEBUGP ("Sending UCR-61S2B initialization packet...\n" );Often we just wouldn't bother about something this minor.
But I see later on that we pass the address of `partial' into some other function and I am guessing that this produces some warning with some tool which you didn't tell us about?
it fixed 2 sparse warnings:drivers/usb/storage/initializers.c:83:26: warning: incorrect type in argument 5 (different signedness)drivers/usb/storage/initializers.c:83:26: expected unsigned int *act_lendrivers/usb/storage/initializers.c:83:26: got int *<noident>drivers/usb/storage/initializers.c:89:26: warning: incorrect type in argument 5 (different signedness)drivers/usb/storage/initializers.c:89:26: expected unsigned int *act_lendrivers/usb/storage/initializers.c:89:26: got int *<noident>
After you pointed out that I should include warnings in patch description, I've sent this: http://lkml.org/lkml/2007/12/15/157
Marcin