diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-08-27 15:08:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-28 18:37:05 -0400 |
commit | 56543af9563d91c1c5596a7980b416389bdea071 (patch) | |
tree | f5866654e3658607feff0cdcd53bb97970a3c29a /drivers/net | |
parent | d08336e9998b1004b2baad62325d34349a593137 (diff) |
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@gmail.com>
Cc: Ion Badulescu <ionut@badula.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | 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 26c363462856..c3bf288aaf25 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -2078,11 +2078,7 @@ static int __init starfire_init (void) | |||
2078 | printk(KERN_INFO DRV_NAME ": polling (NAPI) enabled\n"); | 2078 | printk(KERN_INFO DRV_NAME ": polling (NAPI) enabled\n"); |
2079 | #endif | 2079 | #endif |
2080 | 2080 | ||
2081 | /* we can do this test only at run-time... sigh */ | 2081 | BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t)); |
2082 | if (sizeof(dma_addr_t) != sizeof(netdrv_addr_t)) { | ||
2083 | printk("This driver has dma_addr_t issues, please send email to maintainer\n"); | ||
2084 | return -ENODEV; | ||
2085 | } | ||
2086 | 2082 | ||
2087 | return pci_register_driver(&starfire_driver); | 2083 | return pci_register_driver(&starfire_driver); |
2088 | } | 2084 | } |