Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 22/30] xhci: Add missing annotation for xhci_set_port_power()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 23/30] xhci: Add missing annotation for xhci_enter_test_mode Jules Irenge
  1 sibling, 0 replies; 2+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Mathias Nyman, Greg Kroah-Hartman, linux-usb

Sparse reports a warning at xhci_set_port_power()

warning: context imbalance in xhci_set_port_power - unexpected unlock

The root cause is the missing annotation at xhci_set_port_power()
Add the missing __must_hold(&xhci->lock) annotattion

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

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 7a3a29e5e9d2..57e3f2c5475a 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -558,6 +558,7 @@ struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd)
  */
 static void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd,
 				u16 index, bool on, unsigned long *flags)
+	__must_hold(&xhci->lock)
 {
 	struct xhci_hub *rhub;
 	struct xhci_port *port;
-- 
2.24.1


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

* [PATCH 23/30] xhci: Add missing annotation for xhci_enter_test_mode
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
  2020-02-14 20:47   ` [PATCH 22/30] xhci: Add missing annotation for xhci_set_port_power() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  1 sibling, 0 replies; 2+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Mathias Nyman, Greg Kroah-Hartman, linux-usb

Sparse reports a warning at xhci_enter_test_mode()

warning: context imbalance in  xhci_enter_test_mode - unexpected unlock

The root cause is the missing annotation at xhci_enter_test_mode()
Add the missing __must_hold(&xhci->lock) annotattion

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

diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 57e3f2c5475a..38839308557e 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -609,6 +609,7 @@ static void xhci_port_set_test_mode(struct xhci_hcd *xhci,
 
 static int xhci_enter_test_mode(struct xhci_hcd *xhci,
 				u16 test_mode, u16 wIndex, unsigned long *flags)
+	__must_hold(&xhci->lock)
 {
 	int i, retval;
 
-- 
2.24.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0/30>
     [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
2020-02-14 20:47   ` [PATCH 22/30] xhci: Add missing annotation for xhci_set_port_power() Jules Irenge
2020-02-14 20:47   ` [PATCH 23/30] xhci: Add missing annotation for xhci_enter_test_mode Jules Irenge

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git