]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ixp2000: fix gcc4 breakage
authorLennert Buytenhek <buytenh@wantstofly.org>
Wed, 29 Mar 2006 13:12:44 +0000 (15:12 +0200)
committerJeff Garzik <jeff@garzik.org>
Wed, 29 Mar 2006 22:34:02 +0000 (17:34 -0500)
gcc4 doesn't like us declaring a static function inside another
function.  We can do away with this construct altogether and use
BUILD_BUG_ON() instead (idea from Andi Kleen.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ixp2000/ixpdev.c

index 77f104a005f3c0f1e48a653c6a3f1c6054410d69..fbc2d21020f4ee9ac2cca49a5b3b3d7764a9a9fe 100644 (file)
@@ -299,10 +299,7 @@ int ixpdev_init(int __nds_count, struct net_device **__nds,
        int i;
        int err;
 
-       if (RX_BUF_COUNT > 192 || TX_BUF_COUNT > 192) {
-               static void __too_many_rx_or_tx_buffers(void);
-               __too_many_rx_or_tx_buffers();
-       }
+       BUILD_BUG_ON(RX_BUF_COUNT > 192 || TX_BUF_COUNT > 192);
 
        printk(KERN_INFO "IXP2000 MSF ethernet driver %s\n", DRV_MODULE_VERSION);