Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: udc: Remove in_interrupt()/in_irq() from comments

The usage of in_irq()/in_interrupt() in drivers is phased out for various
reasons.

The context description for usb_gadget_giveback_request() is misleading as
in_interupt() means: hard interrupt or soft interrupt or bottom half
disabled regions. But it's also invoked from task context when endpoints
are torn down. Remove it as it's more confusing than helpful.

Replace also the in_irq() comment with plain text.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org

Link: https://lore.kernel.org/r/20201019101110.744172050@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ahmed S. Darwish and committed by
Greg Kroah-Hartman
cce86615 2e7e9b64

+4 -4
-2
drivers/usb/gadget/udc/core.c
··· 897 897 * @ep: the endpoint to be used with with the request 898 898 * @req: the request being given back 899 899 * 900 - * Context: in_interrupt() 901 - * 902 900 * This is called by device controller drivers in order to return the 903 901 * completed request back to the gadget layer. 904 902 */
+4 -2
drivers/usb/gadget/udc/dummy_hcd.c
··· 1754 1754 return ret_val; 1755 1755 } 1756 1756 1757 - /* drive both sides of the transfers; looks like irq handlers to 1758 - * both drivers except the callbacks aren't in_irq(). 1757 + /* 1758 + * Drive both sides of the transfers; looks like irq handlers to both 1759 + * drivers except that the callbacks are invoked from soft interrupt 1760 + * context. 1759 1761 */ 1760 1762 static void dummy_timer(struct timer_list *t) 1761 1763 {