projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d08336e
)
starfire: use BUILD_BUG_ON for netdrv_addr_t
author
Akinobu Mita
<
[email protected]
>
Fri, 27 Aug 2010 19:08:45 +0000
(19:08 +0000)
committer
David S. Miller
<
[email protected]
>
Sat, 28 Aug 2010 22:37:05 +0000
(15:37 -0700)
Detect size mismatch for netdrv_addr_t at build time rather than
checking at module load time.
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: Ion Badulescu <
[email protected]
>
Cc: "David S. Miller" <
[email protected]
>
Cc:
[email protected]
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/starfire.c
patch
|
blob
|
history
diff --git
a/drivers/net/starfire.c
b/drivers/net/starfire.c
index 26c36346285666e388551f20a0c3c2edc6b6e503..c3bf288aaf25eb8af37fad041527f174f2c33dc3 100644
(file)
--- 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);
}