From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Dooks Subject: [patch 2/2] drivers/net/bonding: move mutex decleration to header Date: Sun, 14 Sep 2008 16:56:13 +0100 Message-ID: <20080914155715.011163418@fluff.org.uk> References: <20080914155611.272940975@fluff.org.uk> Cc: Ben Dooks To: Jeff Garzik , netdev Return-path: Received: from aeryn.fluff.org.uk ([87.194.8.8]:61051 "EHLO kira.home.fluff.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752928AbYINP5Q (ORCPT ); Sun, 14 Sep 2008 11:57:16 -0400 Content-Disposition: inline; filename=bonding-fix-mutex.patch Sender: netdev-owner@vger.kernel.org List-ID: Fix the sparse error generated by bonding_mutex being declared in bond_sysfs.c but used in bond_main.c by declaring an 'extern' in bond_main.c. Fix this by moving the bond_main decleration to bonding.h. The sparse warning is as follows: bond_sysfs.c:67:14: warning: symbol 'bonding_mutex' was not declared. Should it be static? Signed-off-by: Ben Dooks Index: linux-git-test-next-cats/drivers/net/bonding/bond_main.c =================================================================== --- linux-git-test-next-cats.orig/drivers/net/bonding/bond_main.c 2008-09-14 16:51:54.000000000 +0100 +++ linux-git-test-next-cats/drivers/net/bonding/bond_main.c 2008-09-14 16:51:59.000000000 +0100 @@ -151,7 +151,6 @@ LIST_HEAD(bond_dev_list); static struct proc_dir_entry *bond_proc_dir = NULL; #endif -extern struct mutex bonding_mutex; static __be32 arp_target[BOND_MAX_ARP_TARGETS] = { 0, } ; static int arp_ip_count = 0; static int bond_mode = BOND_MODE_ROUNDROBIN; Index: linux-git-test-next-cats/drivers/net/bonding/bonding.h =================================================================== --- linux-git-test-next-cats.orig/drivers/net/bonding/bonding.h 2008-09-14 16:51:04.000000000 +0100 +++ linux-git-test-next-cats/drivers/net/bonding/bonding.h 2008-09-14 16:51:21.000000000 +0100 @@ -342,5 +342,8 @@ extern struct bond_parm_tbl xmit_hashtyp extern struct bond_parm_tbl arp_validate_tbl[]; extern struct bond_parm_tbl fail_over_mac_tbl[]; +/* exported from bond_sysfs.c */ +extern struct mutex bonding_mutex; + #endif /* _LINUX_BONDING_H */ -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes'