mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Drivers:staging:ozwpan Fixed sparse context imbalance warning
@ 2014-02-28 16:57 Surendra Patil
  2014-02-28 17:05 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Surendra Patil @ 2014-02-28 16:57 UTC (permalink / raw)
  To: rupesh.gujare, gregkh; +Cc: devel, linux-kernel, surendra.tux

Sparse warns about -
drivers/staging/ozwpan/ozproto.c:797:6: warning: context imbalance in 'oz_polling_lock_bh' - wrong count at exit
drivers/staging/ozwpan/ozproto.c:802:6: warning: context imbalance in 'oz_polling_unlock_bh' - unexpected unlock
so added __acquires() and __releases().

Signed-off-by: Surendra Patil <surendra.tux@gmail.com>
---
 drivers/staging/ozwpan/ozproto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index e7138ed..b47cec1 100644
--- a/drivers/staging/ozwpan/ozproto.c
+++ b/drivers/staging/ozwpan/ozproto.c
@@ -795,11 +795,13 @@ int oz_get_pd_list(struct oz_mac_addr *addr, int max_count)
 }
 
 void oz_polling_lock_bh(void)
+__acquires(&g_polling_block)
 {
 	spin_lock_bh(&g_polling_lock);
 }
 
 void oz_polling_unlock_bh(void)
+__releases(&g_polling_block)
 {
 	spin_unlock_bh(&g_polling_lock);
 }
-- 
1.8.3.2


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

end of thread, other threads:[~2014-02-28 17:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28 16:57 [PATCH] Drivers:staging:ozwpan Fixed sparse context imbalance warning Surendra Patil
2014-02-28 17:05 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome