aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-11 17:18:55 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-12 16:24:58 -0500
commitc958d767dc79250583902a382275961b5da91a4d (patch)
tree002888bdd51be14ac19d7b676c26ee4f4355063c /drivers/scsi
parente390bc0a26ba522f008a1f9479097f1c6fc0189c (diff)
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sym53c416.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
index 6325901e5093..f7d279542fa5 100644
--- a/drivers/scsi/sym53c416.c
+++ b/drivers/scsi/sym53c416.c
@@ -187,10 +187,10 @@
187#define sym53c416_base_2 sym53c416_2 187#define sym53c416_base_2 sym53c416_2
188#define sym53c416_base_3 sym53c416_3 188#define sym53c416_base_3 sym53c416_3
189 189
190static unsigned int sym53c416_base[2] = {0,0}; 190static unsigned int sym53c416_base[2];
191static unsigned int sym53c416_base_1[2] = {0,0}; 191static unsigned int sym53c416_base_1[2];
192static unsigned int sym53c416_base_2[2] = {0,0}; 192static unsigned int sym53c416_base_2[2];
193static unsigned int sym53c416_base_3[2] = {0,0}; 193static unsigned int sym53c416_base_3[2];
194 194
195#endif 195#endif
196 196
@@ -621,25 +621,25 @@ int __init sym53c416_detect(struct scsi_host_template *tpnt)
621 int ints[3]; 621 int ints[3];
622 622
623 ints[0] = 2; 623 ints[0] = 2;
624 if(sym53c416_base) 624 if(sym53c416_base[0])
625 { 625 {
626 ints[1] = sym53c416_base[0]; 626 ints[1] = sym53c416_base[0];
627 ints[2] = sym53c416_base[1]; 627 ints[2] = sym53c416_base[1];
628 sym53c416_setup(NULL, ints); 628 sym53c416_setup(NULL, ints);
629 } 629 }
630 if(sym53c416_base_1) 630 if(sym53c416_base_1[0])
631 { 631 {
632 ints[1] = sym53c416_base_1[0]; 632 ints[1] = sym53c416_base_1[0];
633 ints[2] = sym53c416_base_1[1]; 633 ints[2] = sym53c416_base_1[1];
634 sym53c416_setup(NULL, ints); 634 sym53c416_setup(NULL, ints);
635 } 635 }
636 if(sym53c416_base_2) 636 if(sym53c416_base_2[0])
637 { 637 {
638 ints[1] = sym53c416_base_2[0]; 638 ints[1] = sym53c416_base_2[0];
639 ints[2] = sym53c416_base_2[1]; 639 ints[2] = sym53c416_base_2[1];
640 sym53c416_setup(NULL, ints); 640 sym53c416_setup(NULL, ints);
641 } 641 }
642 if(sym53c416_base_3) 642 if(sym53c416_base_3[0])
643 { 643 {
644 ints[1] = sym53c416_base_3[0]; 644 ints[1] = sym53c416_base_3[0];
645 ints[2] = sym53c416_base_3[1]; 645 ints[2] = sym53c416_base_3[1];