[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1282972125-9968-1-git-send-email-akinobu.mita@gmail.com>
Date: Sat, 28 Aug 2010 14:08:45 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: netdev@...r.kernel.org
Cc: Akinobu Mita <akinobu.mita@...il.com>,
Ion Badulescu <ionut@...ula.org>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH] starfire: use BUILD_BUG_ON for netdrv_addr_t
Detect size mismatch for netdrv_addr_t at build time rather than
checking at module load time.
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
Cc: Ion Badulescu <ionut@...ula.org>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
---
drivers/net/starfire.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 26c3634..c3bf288 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -2078,11 +2078,7 @@ static int __init starfire_init (void)
printk(KERN_INFO DRV_NAME ": polling (NAPI) enabled\n");
#endif
- /* we can do this test only at run-time... sigh */
- if (sizeof(dma_addr_t) != sizeof(netdrv_addr_t)) {
- printk("This driver has dma_addr_t issues, please send email to maintainer\n");
- return -ENODEV;
- }
+ BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t));
return pci_register_driver(&starfire_driver);
}
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists