Skip to contentSkip to conversation

bonding: fix bond_option_mode_set warning

PATCH Applied Nikolay Aleksandrov 2 participants 3 messages Jul 15, 2014 – Jul 16, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: fix bond_option_mode_set warning

During the conversion to "static" functions this one got left out, only its prototype was converted, thus resulting in:
drivers/net/bonding//bond_options.c:674:5: warning: symbol 'bond_option_mode_set' was not declared. Should it be static?

Fix it by making it static and also break the line in two as it was too long.

CC Stephen Hemminger <[email protected]>
CC Jay Vosburgh <[email protected]>
CC Veaceslav Falico <[email protected]>
CC Andy Gospodarek <[email protected]>
CC David S. Miller <[email protected]>
---
 drivers/net/bonding/bond_options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_options.c +2 -1
index 540e0167bf24..124a8135e139 100644
@@ -671,7 +671,8 @@ const struct bond_option *bond_opt_get(unsigned int option)
 	return &bond_opts[option];
 }
 
-int bond_option_mode_set(struct bonding *bond, const struct bond_opt_value *newval)
+static int bond_option_mode_set(struct bonding *bond,
+				const struct bond_opt_value *newval)
 {
 	if (!bond_mode_uses_arp(newval->value) && bond->params.arp_interval) {
 		pr_info("%s: %s mode is incompatible with arp monitoring, start mii monitoring\n",
Signature · 1 line
1.9.3
#1 lore raw
Quoted 8 lines · Nikolay Aleksandrov

During the conversion to "static" functions this one got left out, only its prototype was converted, thus resulting in:
drivers/net/bonding//bond_options.c:674:5: warning: symbol 'bond_option_mode_set' was not declared. Should it be static?

Fix it by making it static and also break the line in two as it was too long.

Quoted 8 lines
CC Stephen Hemminger <[email protected]>
CC Jay Vosburgh <[email protected]>
CC Veaceslav Falico <[email protected]>
CC Andy Gospodarek <[email protected]>
CC David S. Miller <[email protected]>

---

Just FYI, I targeted this at net-next as it's more cosmetic and there aren't any real side-effects because of it. In case you decide it's more appropriate for -net, the commit that did this was:
f3253339a47f ("bonding: options handling cleanup")

and I tested that this patch applies cleanly to -net, so it's fit for there too.

Cheers,
Nik

maintainer Applied
#2 lore raw
In reply to Nikolay Aleksandrov

From: Nikolay Aleksandrov <[email protected]>
Date: Tue, 15 Jul 2014 16:08:57 +0200

Quoted 8 lines

During the conversion to "static" functions this one got left out, only its prototype was converted, thus resulting in:
drivers/net/bonding//bond_options.c:674:5: warning: symbol 'bond_option_mode_set' was not declared. Should it be static?

Fix it by making it static and also break the line in two as it was too long.

Quoted 7 lines
CC Stephen Hemminger <[email protected]>
CC Jay Vosburgh <[email protected]>
CC Veaceslav Falico <[email protected]>
CC Andy Gospodarek <[email protected]>
CC David S. Miller <[email protected]>

Applied, thanks Nikolay.