* [patch 0/2] drivers/net/bonding sparse errors
@ 2008-09-14 15:56 Ben Dooks
2008-09-14 15:56 ` [patch 1/2] drivers/net/bonding: sparse fixes for exported tables Ben Dooks
2008-09-14 15:56 ` [patch 2/2] drivers/net/bonding: move mutex decleration to header Ben Dooks
0 siblings, 2 replies; 5+ messages in thread
From: Ben Dooks @ 2008-09-14 15:56 UTC (permalink / raw)
To: Jeff Garzik, netdev
drivers/net/bonding throws a large number of warnings
when compiling a kernel with sparse. These two patches
remove the easiest offenders to try and cut down the
number and see what is important.
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch 1/2] drivers/net/bonding: sparse fixes for exported tables
2008-09-14 15:56 [patch 0/2] drivers/net/bonding sparse errors Ben Dooks
@ 2008-09-14 15:56 ` Ben Dooks
2008-09-25 2:15 ` Jeff Garzik
2008-09-14 15:56 ` [patch 2/2] drivers/net/bonding: move mutex decleration to header Ben Dooks
1 sibling, 1 reply; 5+ messages in thread
From: Ben Dooks @ 2008-09-14 15:56 UTC (permalink / raw)
To: Jeff Garzik, netdev; +Cc: Ben Dooks
[-- Attachment #1: bonding-fix-internal-include.patch --]
[-- Type: text/plain, Size: 1869 bytes --]
The following sparse warnings are being generated
because bonding.h is missing definitons for items
declared in bond_main.c but also used in bond_sysfs.h
Also export bond_dev_list as this is also declared
in bond_main but used elsewhere in drivers/net/bonding.
bond_main.c:105:20: warning: symbol 'bonding_defaults' was not declared. Should it be static?
bond_main.c:148:1: warning: symbol 'bond_dev_list' was not declared. Should it be static?
bond_main.c:162:22: warning: symbol 'bond_lacp_tbl' was not declared. Should it be static?
bond_main.c:168:22: warning: symbol 'bond_mode_tbl' was not declared. Should it be static?
bond_main.c:179:22: warning: symbol 'xmit_hashtype_tbl' was not declared. Should it be static?
bond_main.c:186:22: warning: symbol 'arp_validate_tbl' was not declared. Should it be static?
bond_main.c:194:22: warning: symbol 'fail_over_mac_tbl' 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/bonding.h
===================================================================
--- linux-git-test-next-cats.orig/drivers/net/bonding/bonding.h 2008-09-14 16:39:30.000000000 +0100
+++ linux-git-test-next-cats/drivers/net/bonding/bonding.h 2008-09-14 16:44:24.000000000 +0100
@@ -333,5 +333,13 @@ void bond_change_active_slave(struct bon
void bond_register_arp(struct bonding *);
void bond_unregister_arp(struct bonding *);
+/* exported from bond_main.c */
+extern struct list_head bond_dev_list;
+extern struct bond_parm_tbl bond_lacp_tbl[];
+extern struct bond_parm_tbl bond_mode_tbl[];
+extern struct bond_parm_tbl xmit_hashtype_tbl[];
+extern struct bond_parm_tbl arp_validate_tbl[];
+extern struct bond_parm_tbl fail_over_mac_tbl[];
+
#endif /* _LINUX_BONDING_H */
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/2] drivers/net/bonding: sparse fixes for exported tables
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
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2008-09-25 2:15 UTC (permalink / raw)
To: Ben Dooks; +Cc: netdev
Ben Dooks wrote:
> The following sparse warnings are being generated
> because bonding.h is missing definitons for items
> declared in bond_main.c but also used in bond_sysfs.h
>
> Also export bond_dev_list as this is also declared
> in bond_main but used elsewhere in drivers/net/bonding.
>
> bond_main.c:105:20: warning: symbol 'bonding_defaults' was not declared. Should it be static?
> bond_main.c:148:1: warning: symbol 'bond_dev_list' was not declared. Should it be static?
> bond_main.c:162:22: warning: symbol 'bond_lacp_tbl' was not declared. Should it be static?
> bond_main.c:168:22: warning: symbol 'bond_mode_tbl' was not declared. Should it be static?
> bond_main.c:179:22: warning: symbol 'xmit_hashtype_tbl' was not declared. Should it be static?
> bond_main.c:186:22: warning: symbol 'arp_validate_tbl' was not declared. Should it be static?
> bond_main.c:194:22: warning: symbol 'fail_over_mac_tbl' 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/bonding.h
> ===================================================================
> --- linux-git-test-next-cats.orig/drivers/net/bonding/bonding.h 2008-09-14 16:39:30.000000000 +0100
> +++ linux-git-test-next-cats/drivers/net/bonding/bonding.h 2008-09-14 16:44:24.000000000 +0100
> @@ -333,5 +333,13 @@ void bond_change_active_slave(struct bon
> void bond_register_arp(struct bonding *);
> void bond_unregister_arp(struct bonding *);
>
> +/* exported from bond_main.c */
> +extern struct list_head bond_dev_list;
> +extern struct bond_parm_tbl bond_lacp_tbl[];
> +extern struct bond_parm_tbl bond_mode_tbl[];
> +extern struct bond_parm_tbl xmit_hashtype_tbl[];
> +extern struct bond_parm_tbl arp_validate_tbl[];
> +extern struct bond_parm_tbl fail_over_mac_tbl[];
applied
patch #2 failed to apply
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/2] drivers/net/bonding: sparse fixes for exported tables
2008-09-25 2:15 ` Jeff Garzik
@ 2008-10-13 9:23 ` Ben Dooks
0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2008-10-13 9:23 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Ben Dooks, netdev
On Wed, Sep 24, 2008 at 10:15:00PM -0400, Jeff Garzik wrote:
> Ben Dooks wrote:
>> The following sparse warnings are being generated
>> because bonding.h is missing definitons for items
>> declared in bond_main.c but also used in bond_sysfs.h
>>
>> Also export bond_dev_list as this is also declared
>> in bond_main but used elsewhere in drivers/net/bonding.
>>
>> bond_main.c:105:20: warning: symbol 'bonding_defaults' was not declared. Should it be static?
>> bond_main.c:148:1: warning: symbol 'bond_dev_list' was not declared. Should it be static?
>> bond_main.c:162:22: warning: symbol 'bond_lacp_tbl' was not declared. Should it be static?
>> bond_main.c:168:22: warning: symbol 'bond_mode_tbl' was not declared. Should it be static?
>> bond_main.c:179:22: warning: symbol 'xmit_hashtype_tbl' was not declared. Should it be static?
>> bond_main.c:186:22: warning: symbol 'arp_validate_tbl' was not declared. Should it be static?
>> bond_main.c:194:22: warning: symbol 'fail_over_mac_tbl' 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/bonding.h
>> ===================================================================
>> --- linux-git-test-next-cats.orig/drivers/net/bonding/bonding.h 2008-09-14 16:39:30.000000000 +0100
>> +++ linux-git-test-next-cats/drivers/net/bonding/bonding.h 2008-09-14 16:44:24.000000000 +0100
>> @@ -333,5 +333,13 @@ void bond_change_active_slave(struct bon
>> void bond_register_arp(struct bonding *);
>> void bond_unregister_arp(struct bonding *);
>> +/* exported from bond_main.c */
>> +extern struct list_head bond_dev_list;
>> +extern struct bond_parm_tbl bond_lacp_tbl[];
>> +extern struct bond_parm_tbl bond_mode_tbl[];
>> +extern struct bond_parm_tbl xmit_hashtype_tbl[];
>> +extern struct bond_parm_tbl arp_validate_tbl[];
>> +extern struct bond_parm_tbl fail_over_mac_tbl[];
>
> applied
>
> patch #2 failed to apply
ok, will sort this out and send a new patch.
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch 2/2] drivers/net/bonding: move mutex decleration to header
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-14 15:56 ` Ben Dooks
1 sibling, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2008-09-14 15:56 UTC (permalink / raw)
To: Jeff Garzik, netdev; +Cc: Ben Dooks
[-- 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'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-13 9:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [patch 2/2] drivers/net/bonding: move mutex decleration to header Ben Dooks
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.