[PATCH] (1/7) chelsio sparse annotations
authorviro@ftp.linux.org.uk <viro@ftp.linux.org.uk>
Mon, 5 Sep 2005 02:25:48 +0000 (03:25 +0100)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 5 Sep 2005 21:57:22 +0000 (17:57 -0400)
NULL noise removal, __iomem annotations, use of if_mii() instead of
open-coding it.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/chelsio/common.h
drivers/net/chelsio/cxgb2.c

index f09348802b46fb8fabe0f9535e6808c68b59bbee..bf3e7b6a7a1898290635cfb134f6bce0016992ef 100644 (file)
@@ -88,7 +88,7 @@ struct t1_rx_mode {
 
 static inline u8 *t1_get_next_mcaddr(struct t1_rx_mode *rm)
 {
-       u8 *addr = 0;
+       u8 *addr = NULL;
 
        if (rm->idx++ < rm->dev->mc_count) {
                addr = rm->list->dmi_addr;
@@ -190,7 +190,7 @@ struct sge;
 struct peespi;
 
 struct adapter {
-       u8 *regs;
+       u8 __iomem *regs;
        struct pci_dev *pdev;
        unsigned long registered_device_map;
        unsigned long open_device_map;
index 28ae478b386dcccb5259949e6bb321fc97a37040..349ebe783ed6b87892d242e679e5a9b210a51696 100644 (file)
@@ -824,7 +824,7 @@ static void cxgb_proc_cleanup(struct adapter *adapter,
 static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
 {
         struct adapter *adapter = dev->priv;
-        struct mii_ioctl_data *data = (struct mii_ioctl_data *)&req->ifr_data;
+        struct mii_ioctl_data *data = if_mii(req);
 
        switch (cmd) {
         case SIOCGMIIPHY: