From: Akinobu Mita Date: Fri, 27 Aug 2010 19:08:45 +0000 (+0000) Subject: starfire: use BUILD_BUG_ON for netdrv_addr_t X-Git-Tag: MMI-PSA29.97-13-9~21994^2~640 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56543af9563d91c1c5596a7980b416389bdea071;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: Ion Badulescu Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- 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) 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); }