public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrey Konovalov <andreyknvl@google.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	"Jacky.Cao@sony.com" <Jacky.Cao@sony.com>,
	linux-usb@vger.kernel.org (open list:USB GADGET/PERIPHERAL
	SUBSYSTEM)
Subject: [PATCH 5/6] USB: dummy-hcd: Add missing annotation for set_link_state()
Date: Wed, 29 Apr 2020 11:05:27 +0100	[thread overview]
Message-ID: <20200429100529.19645-6-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200429100529.19645-1-jbi.octave@gmail.com>

Sparse reports a warning at set_link_state()

warning: context imbalance in set_link_state() - unexpected unlock

The root cause is the missing annotation at set_link_state()
Add the missing __must_hold(&dum->lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/usb/gadget/udc/dummy_hcd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 4c9d1e49d5ed..c07ddf11e137 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -427,6 +427,7 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd)
 
 /* caller must hold lock */
 static void set_link_state(struct dummy_hcd *dum_hcd)
+	__must_hold(&dum->lock)
 {
 	struct dummy *dum = dum_hcd->dum;
 	unsigned int power_bit;
-- 
2.25.3


  parent reply	other threads:[~2020-04-29 10:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/6>
2020-03-16 23:37 ` [PATCH 0/6] lock warning cleanups Jules Irenge
2020-03-16 23:37   ` [PATCH 1/6] namei: Add missing annotation for unlazy_walk() Jules Irenge
2020-03-16 23:38   ` [PATCH 2/6] namei: Add missing annotation for unlazy_child() Jules Irenge
2020-03-16 23:38   ` [PATCH 3/6] fs: Add missing annotation for __wait_on_freeing_inode() Jules Irenge
2020-03-16 23:38   ` [PATCH 4/6] fs/fs-writeback.c: Add missing annotation for wbc_attach_and_unlock_inode() Jules Irenge
2020-03-16 23:38   ` [PATCH 5/6] fs/fs-writeback.c: replace two annotations for __inode_wait_for_writeback() Jules Irenge
2020-03-16 23:38   ` [PATCH 6/6] fs: add missing annotation for pin_kill() Jules Irenge
2020-04-29 10:05 ` [PATCH 0/6] Lock warnings cleanup Jules Irenge
2020-04-29 10:05   ` [PATCH 1/6] usb: gadget: Add missing annotation for xudc_handle_setup() Jules Irenge
2020-04-29 10:05   ` [PATCH 2/6] udp: Add missing annotations for busylock_acquire() and busylock_release() Jules Irenge
2020-04-29 10:05   ` [PATCH 3/6] udp: Add annotations for udp_rmem_release() Jules Irenge
2020-04-29 10:05   ` [PATCH 4/6] net: atm: Add missing annotation for lec_seq_stop() Jules Irenge
2020-04-29 10:05   ` Jules Irenge [this message]
2020-04-29 10:05   ` [PATCH 6/6] net: atm: Add annotation for lec_priv_walk() Jules Irenge
2020-04-29 10:22     ` Andy Shevchenko
2020-04-29 14:58 ` [PATCH v2] net: atm: Add annotation for lec_priv_walk() and lec_seq_stop() Jules Irenge

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=20200429100529.19645-6-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=Jacky.Cao@sony.com \
    --cc=andreyknvl@google.com \
    --cc=balbi@kernel.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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