Re: [patch V2 12/13] usb: core: Replace in_interrupt() in comments
From: Alan Stern
Date: Mon Oct 19 2020 - 12:28:43 EST
On Mon, Oct 19, 2020 at 12:06:41PM +0200, Thomas Gleixner wrote:
> From: Ahmed S. Darwish <a.darwish@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx
> ---
> 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@xxxxxxxxxxxxxxxxxxx>