Commit c958d767dc79250583902a382275961b5da91a4d
1 parent
e390bc0a26
Exists in
master
and in
4 other branches
[SCSI] sym53c416: fix module parameters
It looks like there's been a bug in the module parameter setup forever. The upshot doesn't really matter, because even if no parameters are ever set, we just call sym53c416_setup() three times, but the zero values in the arrays eventually cause nothing to happen. Unfortunately gcc has started to notice this now too: drivers/scsi/sym53c416.c: In function 'sym53c416_detect': drivers/scsi/sym53c416.c:624: warning: the address of 'sym53c416' will always evaluate as 'true' drivers/scsi/sym53c416.c:630: warning: the address of 'sym53c416_1' will always evaluate as 'true' drivers/scsi/sym53c416.c:636: warning: the address of 'sym53c416_2' will always evaluate as 'true' drivers/scsi/sym53c416.c:642: warning: the address of 'sym53c416_3' will always evaluate as 'true' So fix this longstanding bug to keep gcc quiet. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
drivers/scsi/sym53c416.c
... | ... | @@ -187,10 +187,10 @@ |
187 | 187 | #define sym53c416_base_2 sym53c416_2 |
188 | 188 | #define sym53c416_base_3 sym53c416_3 |
189 | 189 | |
190 | -static unsigned int sym53c416_base[2] = {0,0}; | |
191 | -static unsigned int sym53c416_base_1[2] = {0,0}; | |
192 | -static unsigned int sym53c416_base_2[2] = {0,0}; | |
193 | -static unsigned int sym53c416_base_3[2] = {0,0}; | |
190 | +static unsigned int sym53c416_base[2]; | |
191 | +static unsigned int sym53c416_base_1[2]; | |
192 | +static unsigned int sym53c416_base_2[2]; | |
193 | +static unsigned int sym53c416_base_3[2]; | |
194 | 194 | |
195 | 195 | #endif |
196 | 196 | |
197 | 197 | |
198 | 198 | |
199 | 199 | |
... | ... | @@ -621,25 +621,25 @@ |
621 | 621 | int ints[3]; |
622 | 622 | |
623 | 623 | ints[0] = 2; |
624 | - if(sym53c416_base) | |
624 | + if(sym53c416_base[0]) | |
625 | 625 | { |
626 | 626 | ints[1] = sym53c416_base[0]; |
627 | 627 | ints[2] = sym53c416_base[1]; |
628 | 628 | sym53c416_setup(NULL, ints); |
629 | 629 | } |
630 | - if(sym53c416_base_1) | |
630 | + if(sym53c416_base_1[0]) | |
631 | 631 | { |
632 | 632 | ints[1] = sym53c416_base_1[0]; |
633 | 633 | ints[2] = sym53c416_base_1[1]; |
634 | 634 | sym53c416_setup(NULL, ints); |
635 | 635 | } |
636 | - if(sym53c416_base_2) | |
636 | + if(sym53c416_base_2[0]) | |
637 | 637 | { |
638 | 638 | ints[1] = sym53c416_base_2[0]; |
639 | 639 | ints[2] = sym53c416_base_2[1]; |
640 | 640 | sym53c416_setup(NULL, ints); |
641 | 641 | } |
642 | - if(sym53c416_base_3) | |
642 | + if(sym53c416_base_3[0]) | |
643 | 643 | { |
644 | 644 | ints[1] = sym53c416_base_3[0]; |
645 | 645 | ints[2] = sym53c416_base_3[1]; |