2018-03-23 19:49:17

by Fengguang Wu

[permalink] [raw]
Subject: [net-next:master 1142/1149] net/tipc/discover.c:137:6: sparse: symbol 'tipc_disc_addr_trial_msg' was not declared. Should it be static?

tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: f452518c982e57538e6d49da0a2c80eef22087ab
commit: 25b0b9c4e835ffaa65b61c3efe2e28acf84d0259 [1142/1149] tipc: handle collisions of 32-bit node address hash values
reproduce:
# apt-get install sparse
git checkout 25b0b9c4e835ffaa65b61c3efe2e28acf84d0259
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> net/tipc/discover.c:137:6: sparse: symbol 'tipc_disc_addr_trial_msg' was not declared. Should it be static?

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


2018-03-23 19:49:24

by Fengguang Wu

[permalink] [raw]
Subject: [RFC PATCH net-next] tipc: tipc_disc_addr_trial_msg() can be static


Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: Fengguang Wu <[email protected]>
---
discover.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index e765573..9f666e0 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -134,13 +134,13 @@ static void disc_dupl_alert(struct tipc_bearer *b, u32 node_addr,

/* tipc_disc_addr_trial(): - handle an address uniqueness trial from peer
*/
-bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
- struct tipc_media_addr *maddr,
- struct tipc_bearer *b,
- u32 dst, u32 src,
- u32 sugg_addr,
- u8 *peer_id,
- int mtyp)
+static bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
+ struct tipc_media_addr *maddr,
+ struct tipc_bearer *b,
+ u32 dst, u32 src,
+ u32 sugg_addr,
+ u8 *peer_id,
+ int mtyp)
{
struct net *net = d->net;
struct tipc_net *tn = tipc_net(net);

2018-03-24 12:59:30

by Jon Maloy

[permalink] [raw]
Subject: RE: [RFC PATCH net-next] tipc: tipc_disc_addr_trial_msg() can be static

Acked-by: Jon Maloy [email protected]

Thanks, Fengguang

> -----Original Message-----
> From: [email protected] [mailto:netdev-
> [email protected]] On Behalf Of kbuild test robot
> Sent: Friday, March 23, 2018 15:48
> To: Jon Maloy <[email protected]>
> Cc: [email protected]; [email protected]; Ying Xue
> <[email protected]>; [email protected]; linux-
> [email protected]
> Subject: [RFC PATCH net-next] tipc: tipc_disc_addr_trial_msg() can be static
>
>
> Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash
> values")
> Signed-off-by: Fengguang Wu <[email protected]>
> ---
> discover.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/net/tipc/discover.c b/net/tipc/discover.c index e765573..9f666e0
> 100644
> --- a/net/tipc/discover.c
> +++ b/net/tipc/discover.c
> @@ -134,13 +134,13 @@ static void disc_dupl_alert(struct tipc_bearer *b,
> u32 node_addr,
>
> /* tipc_disc_addr_trial(): - handle an address uniqueness trial from peer
> */
> -bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
> - struct tipc_media_addr *maddr,
> - struct tipc_bearer *b,
> - u32 dst, u32 src,
> - u32 sugg_addr,
> - u8 *peer_id,
> - int mtyp)
> +static bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
> + struct tipc_media_addr *maddr,
> + struct tipc_bearer *b,
> + u32 dst, u32 src,
> + u32 sugg_addr,
> + u8 *peer_id,
> + int mtyp)
> {
> struct net *net = d->net;
> struct tipc_net *tn = tipc_net(net);

2018-03-26 01:24:58

by David Miller

[permalink] [raw]
Subject: Re: [RFC PATCH net-next] tipc: tipc_disc_addr_trial_msg() can be static

From: kbuild test robot <[email protected]>
Date: Sat, 24 Mar 2018 03:47:42 +0800

> Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
> Signed-off-by: Fengguang Wu <[email protected]>

Applied.