Skip to contentSkip to conversation

staging: lustre: fix sparse warnings in lib-eq.c

PATCH New Toby Smith 1 participant 3 messages May 7, 2014 Staging

lore
Share & tools
lore

Toby Smith

author
#0 lore raw

cover staging: lustre: fix sparse warnings in lib-eq.c

Fix warnings from sparse in lib-eq.c

Toby Smith (2):
staging: lustre: fix sparse warning "should it be static"
staging: lustre: fix sparse warning "unexpected unlock"

 drivers/staging/lustre/lnet/lnet/lib-eq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/2 staging: lustre: fix sparse warning "should it be static"

Fix the following warning in lib-eq.c
warning: symbol 'lnet_eq_dequeue_event' was not declared. Should it be static?

---
 drivers/staging/lustre/lnet/lnet/lib-eq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/lnet/lib-eq.c +1 -1
index 7ce07f6..6e63c23 100644
@@ -238,7 +238,7 @@ lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev)
 	lnet_eq_wait_unlock();
 }
 
-int
+static int
 lnet_eq_dequeue_event(lnet_eq_t *eq, lnet_event_t *ev)
 {
 	int		new_index = eq->eq_deq_seq & (eq->eq_size - 1);
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/2 staging: lustre: fix sparse warning "unexpected unlock"

In reply to Toby Smith

Fix the following warning in lib-eq.c
warning: context imbalance in 'lnet_eq_wait_locked' - unexpected unlock

---
 drivers/staging/lustre/lnet/lnet/lib-eq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/lustre/lnet/lnet/lib-eq.c +1 -0
index 6e63c23..d25dcd8 100644
@@ -325,6 +325,7 @@ EXPORT_SYMBOL(LNetEQWait);
 
 static int
 lnet_eq_wait_locked(int *timeout_ms)
+__must_hold(&the_lnet.ln_eq_wait_lock)
 {
 	int		tms = *timeout_ms;
 	int		wait;
Signature · 1 line
1.9.1