From: Lennert Buytenhek Date: Wed, 29 Mar 2006 13:12:44 +0000 (+0200) Subject: [PATCH] ixp2000: fix gcc4 breakage X-Git-Tag: v2.6.17-rc1~151 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5d4fe2c1ce83c3e967ccc1ba3d580c1a5603a866;p=linux-2.6-omap-h63xx.git [PATCH] ixp2000: fix gcc4 breakage 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index 77f104a005f..fbc2d21020f 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c @@ -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);