浏览代码

[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 <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Lennert Buytenhek 19 年之前
父节点
当前提交
5d4fe2c1ce
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      drivers/net/ixp2000/ixpdev.c

+ 1 - 4
drivers/net/ixp2000/ixpdev.c

@@ -299,10 +299,7 @@ int ixpdev_init(int __nds_count, struct net_device **__nds,
 	int i;
 	int i;
 	int err;
 	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);
 	printk(KERN_INFO "IXP2000 MSF ethernet driver %s\n", DRV_MODULE_VERSION);