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>,
	Michal Simek <michal.simek@xilinx.com>,
	Stephen Boyd <swboyd@chromium.org>,
	linux-usb@vger.kernel.org (open list:USB GADGET/PERIPHERAL
	SUBSYSTEM),
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ
	ARCHITECTURE)
Subject: [PATCH 1/6] usb: gadget: Add missing annotation for xudc_handle_setup()
Date: Wed, 29 Apr 2020 11:05:23 +0100	[thread overview]
Message-ID: <20200429100529.19645-2-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200429100529.19645-1-jbi.octave@gmail.com>

Sparse reports a warning at xudc_handle_setup()

warning: context imbalance in xudc_handle_setup() - unexpected unlock

The root cause is the missing annotation at xudc_handle_setup()

Add the missing __must_hold(&udc->lock) annotation

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

diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index 29d8e5f8bb58..ae22882dba6a 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -1733,6 +1733,7 @@ static void xudc_set_clear_feature(struct xusb_udc *udc)
  * Process setup packet and delegate to gadget layer.
  */
 static void xudc_handle_setup(struct xusb_udc *udc)
+	__must_hold(&udc->lock)
 {
 	struct xusb_ep *ep0 = &udc->ep[0];
 	struct usb_ctrlrequest setup;
-- 
2.25.3


  reply	other threads:[~2020-04-29 10:07 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   ` Jules Irenge [this message]
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   ` [PATCH 5/6] USB: dummy-hcd: Add missing annotation for set_link_state() Jules Irenge
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-2-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=swboyd@chromium.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