linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: fix sparse warnings for undeclared symbols
@ 2014-06-02 12:03 John Church
  2014-06-02 12:19 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: John Church @ 2014-06-02 12:03 UTC (permalink / raw)
  To: gregkh, lisa, bergwolf, andreas.dilger, oleg.drokin,
	doug.s.oucharek, devel, linux-kernel
  Cc: John Church

This patch fixes the following sparse warnings for drivers/staging/lustre/lnet/lnet/router.c:

router.c:139:1: warning: symbol 'lnet_ni_notify_locked' was not declared. Should it be static?
router.c:277:1: warning: symbol 'lnet_add_route_to_rnet' was not declared. Should it be static?

Signed-off-by: John Church <sleeveroller@gmail.com>

---
 drivers/staging/lustre/include/linux/lnet/lib-lnet.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 856fcfa..143bb3a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -650,6 +650,8 @@ extern lnet_ni_t *lnet_net2ni(__u32 net);
 
 int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, cfs_time_t when);
 void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when);
+void lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp);
+void lnet_add_route_to_rnet(lnet_remotenet_t *rnet, lnet_route_t *route);
 int lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway_nid,
 		   unsigned int priority);
 int lnet_check_routes(void);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: lustre: fix sparse warnings for undeclared symbols
  2014-06-02 12:03 [PATCH] staging: lustre: fix sparse warnings for undeclared symbols John Church
@ 2014-06-02 12:19 ` Dan Carpenter
  2014-06-02 13:14   ` John Church
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-06-02 12:19 UTC (permalink / raw)
  To: John Church
  Cc: gregkh, lisa, bergwolf, andreas.dilger, oleg.drokin,
	doug.s.oucharek, devel, linux-kernel

On Mon, Jun 02, 2014 at 01:03:48PM +0100, John Church wrote:
> This patch fixes the following sparse warnings for drivers/staging/lustre/lnet/lnet/router.c:
> 
> router.c:139:1: warning: symbol 'lnet_ni_notify_locked' was not declared. Should it be static?
> router.c:277:1: warning: symbol 'lnet_add_route_to_rnet' was not declared. Should it be static?
> 

Why not just make them static?  They don't seem to be used outside of
that file.  What am I missing?

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: lustre: fix sparse warnings for undeclared symbols
  2014-06-02 12:19 ` Dan Carpenter
@ 2014-06-02 13:14   ` John Church
  0 siblings, 0 replies; 5+ messages in thread
From: John Church @ 2014-06-02 13:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: gregkh, lisa, bergwolf, andreas.dilger, oleg.drokin,
	doug.s.oucharek, devel, linux-kernel

On Mon, Jun 02, 2014 at 03:19:18PM +0300, Dan Carpenter wrote:
> 
> Why not just make them static?  They don't seem to be used outside of
> that file.  What am I missing?
> 

Given a 50/50 choice I based my decision on the surrounding functions which were mostly defined in the header file.

I should have done a little more invstigation which would have led me to the opposite conclusion.

I will redo them as static and resumbit.

Thanks for your help Dan.

Regards,
John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] staging: lustre: Fix sparse warnings for undeclared symbols
@ 2014-06-16 10:44 Scott Weir
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Weir @ 2014-06-16 10:44 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

This patch fixes the sparse warnings in drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c:
sec_lproc.c:58:6: warning: symbol 'sec_flags2str' was not declared. Should it be static?

Signed-off-by: Scott Weir <sjw0410@gmail.com>
---
 drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c
index 1213621..1928bf5 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c
@@ -55,7 +55,7 @@
 struct proc_dir_entry *sptlrpc_proc_root = NULL;
 EXPORT_SYMBOL(sptlrpc_proc_root);

-char *sec_flags2str(unsigned long flags, char *buf, int bufsize)
+static char *sec_flags2str(unsigned long flags, char *buf, int bufsize)
 {
 	buf[0] = '\0';

--
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] staging: lustre: fix sparse warnings for undeclared symbols
@ 2014-06-02 13:31 John Church
  0 siblings, 0 replies; 5+ messages in thread
From: John Church @ 2014-06-02 13:31 UTC (permalink / raw)
  To: gregkh, lisa, bergwolf, andreas.dilger, oleg.drokin,
	doug.s.oucharek, devel, linux-kernel
  Cc: John Church

This patch fixes the following sparse warnings for drivers/staging/lustre/lnet/lnet/router.c:

router.c:139:1: warning: symbol 'lnet_ni_notify_locked' was not declared. Should it be static?
router.c:277:1: warning: symbol 'lnet_add_route_to_rnet' was not declared. Should it be static?

Signed-off-by: John Church <sleeveroller@gmail.com>

---
 drivers/staging/lustre/lnet/lnet/router.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 995f509..87e0c3b 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -135,7 +135,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when)
 	CDEBUG(D_NET, "set %s %d\n", libcfs_nid2str(lp->lp_nid), alive);
 }
 
-void
+static void
 lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
 {
 	int	alive;
@@ -273,7 +273,7 @@ static void lnet_shuffle_seed(void)
 }
 
 /* NB expects LNET_LOCK held */
-void
+static void
 lnet_add_route_to_rnet (lnet_remotenet_t *rnet, lnet_route_t *route)
 {
 	unsigned int      len = 0;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-16 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 12:03 [PATCH] staging: lustre: fix sparse warnings for undeclared symbols John Church
2014-06-02 12:19 ` Dan Carpenter
2014-06-02 13:14   ` John Church
2014-06-02 13:31 John Church
2014-06-16 10:44 [PATCH] staging: lustre: Fix " Scott Weir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).