All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: Jeff Garzik <jeff@garzik.org>, netdev <netdev@vger.kernel.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Subject: [patch 2/2] drivers/net/bonding: move mutex decleration to header
Date: Sun, 14 Sep 2008 16:56:13 +0100	[thread overview]
Message-ID: <20080914155715.011163418@fluff.org.uk> (raw)
In-Reply-To: 20080914155611.272940975@fluff.org.uk

[-- Attachment #1: bonding-fix-mutex.patch --]
[-- Type: text/plain, Size: 1662 bytes --]

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 <ben-linux@fluff.org>
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'

      parent reply	other threads:[~2008-09-14 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14 15:56 [patch 0/2] drivers/net/bonding sparse errors Ben Dooks
2008-09-14 15:56 ` [patch 1/2] drivers/net/bonding: sparse fixes for exported tables Ben Dooks
2008-09-25  2:15   ` Jeff Garzik
2008-10-13  9:23     ` Ben Dooks
2008-09-14 15:56 ` Ben Dooks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080914155715.011163418@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.