staging: lustre: fix sparse warnings for undeclared symbols
PATCH 1/1 staging: lustre: fix sparse warnings for undeclared symbols
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?
--- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/lustre/include/linux/lnet/lib-lnet.h +2 -0
@@ -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 );
Signature · 1 line
1.7.10.4
Quoted 5 lines · 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?
Why not just make them static? They don't seem to be used outside of that file. What am I missing?
regards,
dan carpenter
Quoted 4 lines · Dan Carpenter
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