Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c958d767 authored by James Bottomley's avatar James Bottomley
Browse files

[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: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent e390bc0a
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -187,10 +187,10 @@
#define sym53c416_base_2 sym53c416_2
#define sym53c416_base_2 sym53c416_2
#define sym53c416_base_3 sym53c416_3
#define sym53c416_base_3 sym53c416_3


static unsigned int sym53c416_base[2] = {0,0};
static unsigned int sym53c416_base[2];
static unsigned int sym53c416_base_1[2] = {0,0};
static unsigned int sym53c416_base_1[2];
static unsigned int sym53c416_base_2[2] = {0,0};
static unsigned int sym53c416_base_2[2];
static unsigned int sym53c416_base_3[2] = {0,0};
static unsigned int sym53c416_base_3[2];


#endif
#endif


@@ -621,25 +621,25 @@ int __init sym53c416_detect(struct scsi_host_template *tpnt)
	int ints[3];
	int ints[3];


	ints[0] = 2;
	ints[0] = 2;
	if(sym53c416_base)
	if(sym53c416_base[0])
	{
	{
		ints[1] = sym53c416_base[0];
		ints[1] = sym53c416_base[0];
		ints[2] = sym53c416_base[1];
		ints[2] = sym53c416_base[1];
		sym53c416_setup(NULL, ints);
		sym53c416_setup(NULL, ints);
	}
	}
	if(sym53c416_base_1)
	if(sym53c416_base_1[0])
	{
	{
		ints[1] = sym53c416_base_1[0];
		ints[1] = sym53c416_base_1[0];
		ints[2] = sym53c416_base_1[1];
		ints[2] = sym53c416_base_1[1];
		sym53c416_setup(NULL, ints);
		sym53c416_setup(NULL, ints);
	}
	}
	if(sym53c416_base_2)
	if(sym53c416_base_2[0])
	{
	{
		ints[1] = sym53c416_base_2[0];
		ints[1] = sym53c416_base_2[0];
		ints[2] = sym53c416_base_2[1];
		ints[2] = sym53c416_base_2[1];
		sym53c416_setup(NULL, ints);
		sym53c416_setup(NULL, ints);
	}
	}
	if(sym53c416_base_3)
	if(sym53c416_base_3[0])
	{
	{
		ints[1] = sym53c416_base_3[0];
		ints[1] = sym53c416_base_3[0];
		ints[2] = sym53c416_base_3[1];
		ints[2] = sym53c416_base_3[1];