[PATCH] net/ipv4/raw.c: Fix sparse noise about context imbalance

From: H Hartley Sweeten
Date: Tue Aug 04 2009 - 21:23:10 EST


Fix sparse noise due to context imbalance by annotating the functions.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>

---

diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 2979f14..e83f7c5 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -896,6 +896,7 @@ static struct sock *raw_get_idx(struct seq_file *seq, loff_t pos)
}

void *raw_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&state->h->lock)
{
struct raw_iter_state *state = raw_seq_private(seq);

@@ -918,6 +919,7 @@ void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos)
EXPORT_SYMBOL_GPL(raw_seq_next);

void raw_seq_stop(struct seq_file *seq, void *v)
+ __releases(&state->h->lock)
{
struct raw_iter_state *state = raw_seq_private(seq);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/