From: viro@ftp.linux.org.uk Date: Mon, 5 Sep 2005 02:25:48 +0000 (+0100) Subject: [PATCH] (1/7) chelsio sparse annotations X-Git-Tag: v2.6.14-rc1~748^2~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91fb4c964c606e63ce0d0d31814728d62a5de9bc;p=linux-2.6 [PATCH] (1/7) chelsio sparse annotations NULL noise removal, __iomem annotations, use of if_mii() instead of open-coding it. Signed-off-by: Al Viro Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index f09348802b..bf3e7b6a7a 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h @@ -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; diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 28ae478b38..349ebe783e 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c @@ -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: