[patch V2 12/13] usb: core: Replace in_interrupt() in comments

Alan Stern stern at rowland.harvard.edu
Mon Oct 19 12:28:40 EDT 2020


On Mon, Oct 19, 2020 at 12:06:41PM +0200, Thomas Gleixner wrote:
> From: Ahmed S. Darwish <a.darwish at linutronix.de>
> 
> The usage of in_interrupt() in drivers is phased out for various reasons.
> 
> Various comments use !in_interrupt() to describe calling context for
> functions which might sleep. That's wrong because the calling context has
> to be preemptible task context, which is not what !in_interrupt()
> describes.
> 
> Replace !in_interrupt() with more accurate plain text descriptions.
> 
> The comment for usb_hcd_poll_rh_status() is misleading as this function is
> called from all kinds of contexts including preemptible task
> context. Remove it as there is obviously no restriction.
> 
> Signed-off-by: Ahmed S. Darwish <a.darwish at linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: linux-usb at vger.kernel.org
> ---
> V2: Fixup the comments according to review (Alan)
> ---
>  drivers/usb/core/buffer.c  |    6 ++++--
>  drivers/usb/core/hcd-pci.c |    6 ++++--
>  drivers/usb/core/hcd.c     |   26 +++++++++++++++++---------
>  drivers/usb/core/hub.c     |    3 ++-
>  drivers/usb/core/message.c |   35 ++++++++++++++++++++++-------------
>  drivers/usb/core/usb.c     |    4 ++--
>  6 files changed, 51 insertions(+), 29 deletions(-)

Acked-by: Alan Stern <stern at rowland.harvard.edu>



More information about the linux-arm-kernel mailing list