From: Hannes Eder <hannes@hanneseder.net>
To: netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] drivers/isdn/capi: fix sparse warning: context imbalance
Date: Thu, 26 Feb 2009 00:08:40 +0100 [thread overview]
Message-ID: <20090225230828.5377.29853.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090225230737.5377.31370.stgit@localhost.localdomain>
Impact: Attribute functions with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
drivers/isdn/capi/kcapi_proc.c:241:13: warning: context imbalance in 'capi_driver_start' - wrong count at exit
drivers/isdn/capi/kcapi_proc.c:252:13: warning: context imbalance in 'capi_driver_stop' - unexpected unlock
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
drivers/isdn/capi/kcapi_proc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index c29208b..50ed778 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -239,6 +239,7 @@ static const struct file_operations proc_applstats_ops = {
// ---------------------------------------------------------------------------
static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
+ __acquires(&capi_drivers_list_lock)
{
read_lock(&capi_drivers_list_lock);
return seq_list_start(&capi_drivers, *pos);
@@ -250,6 +251,7 @@ static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void capi_driver_stop(struct seq_file *seq, void *v)
+ __releases(&capi_drivers_list_lock)
{
read_unlock(&capi_drivers_list_lock);
}
next prev parent reply other threads:[~2009-02-25 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 23:08 [PATCH 0/5] drivers/isdn: fix sparse warnings Hannes Eder
2009-02-25 23:08 ` Hannes Eder [this message]
2009-02-25 23:09 ` [PATCH 2/5] drivers/isdn/act2000: fix sparse warning: symbol shadows an earlier one Hannes Eder
2009-02-25 23:11 ` [PATCH 3/5] drivers/isdn/hisax: fix sparse warning: Should it be static? Hannes Eder
2009-02-25 23:11 ` [PATCH 4/5] drivers/isdn/hardware/icon: fix sparse warning: cast truncates bits Hannes Eder
2009-02-25 23:11 ` [PATCH 5/5] drivers/isdn/hardware/eicon: fix sparse warnings: Should it be static? Hannes Eder
2009-02-27 9:01 ` [PATCH 0/5] drivers/isdn: fix sparse warnings David Miller
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=20090225230828.5377.29853.stgit@localhost.localdomain \
--to=hannes@hanneseder.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).