From: Greg KH <gregkh@linuxfoundation.org>
To: Surendra Patil <surendra.tux@gmail.com>
Cc: rupesh.gujare@atmel.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Drivers:staging:ozwpan Fixed sparse context imbalance warning
Date: Fri, 28 Feb 2014 09:05:55 -0800 [thread overview]
Message-ID: <20140228170555.GA20856@kroah.com> (raw)
In-Reply-To: <1393606622-7549-1-git-send-email-surendra.tux@gmail.com>
On Fri, Feb 28, 2014 at 08:57:02AM -0800, Surendra Patil wrote:
> 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);
> }
How about ripping out this "wrapper" function entirely and replacing all
calls to them with the "real" call to the spinlock function?
thanks,
greg k-h
prev parent reply other threads:[~2014-02-28 17:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 16:57 Surendra Patil
2014-02-28 17:05 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140228170555.GA20856@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rupesh.gujare@atmel.com \
--cc=surendra.tux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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