Re: Some compiler warnings in 2.4.17-pre5

From: Adrian Bunk (bunk@fs.tum.de)
Date: Wed Dec 12 2001 - 14:17:32 EST


On Sat, 8 Dec 2001, Alan Cox wrote:

> > +#ifdef MODULE
> > static Scsi_Host_Template driver_template = IPH5526_SCSI_FC;
> > +#endif /* MODULE */
>
> The ifdefs are frequently uglier than the warning 8). The i820 one looks
> most suspicious however.

It's perhaps a better solution to move driver_template inside the
#ifdef MODULE piece of code where it's used (I see that this was done in
some other places in 2.4.17-pre2 by David S. Miller):

--- drivers/net/fc/iph5526.c.old Wed Dec 12 20:11:44 2001
+++ drivers/net/fc/iph5526.c Wed Dec 12 20:13:34 2001
@@ -224,8 +224,6 @@
 static int get_scsi_oxid(struct fc_info *fi);
 static void update_scsi_oxid(struct fc_info *fi);

-static Scsi_Host_Template driver_template = IPH5526_SCSI_FC;
-
 static void iph5526_timeout(struct net_device *dev);

 static int iph5526_probe_pci(struct net_device *dev);
@@ -4529,6 +4527,7 @@
 static int irq;
 static int bad; /* 0xbad = bad sig or no reset ack */
 static int scsi_registered;
+static Scsi_Host_Template driver_template = IPH5526_SCSI_FC;

 int init_module(void)

> Alan

cu
Adrian

-- 

Get my GPG key: finger bunk@debian.org | gpg --import

Fingerprint: B29C E71E FE19 6755 5C8A 84D4 99FC EA98 4F12 B400

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:23 EST