Message ID | 20201014145727.828083323@linutronix.de |
---|---|
State | Superseded |
Headers | show |
Series | UBS: Cleanup in_interupt/in_irq/in_atomic() usage | expand |
On 10/14/20 8:52 AM, Thomas Gleixner wrote: > From: Ahmed S. Darwish <a.darwish@linutronix.de> > > The usage of in_interrupt() in drivers is phased out and Linus clearly > requested that code which changes behaviour depending on context should > either be separated or the context be conveyed in an argument passed by the > caller, which usually knows the context. > > usbip_recv() uses in_interrupt() to conditionally print context information > for debugging messages. The value is zero as the function is only called > from various *_rx_loop() kthread functions. Remove it. > > 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> > Cc: Valentina Manea <valentina.manea.m@gmail.com> > Cc: Shuah Khan <shuah@kernel.org> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: linux-usb@vger.kernel.org > > --- > drivers/usb/usbip/usbip_common.c | 5 ----- > 1 file changed, 5 deletions(-) > > --- a/drivers/usb/usbip/usbip_common.c > +++ b/drivers/usb/usbip/usbip_common.c > @@ -324,11 +324,6 @@ int usbip_recv(struct socket *sock, void > } while (msg_data_left(&msg)); > > if (usbip_dbg_flag_xmit) { > - if (!in_interrupt()) > - pr_debug("%-10s:", current->comm); > - else > - pr_debug("interrupt :"); > - > pr_debug("receiving....\n"); > usbip_dump_buffer(buf, size); > pr_debug("received, osize %d ret %d size %zd total %d\n", > > Looks good to me. Acked-by: Shuah Khan <skhan@linuxfoundation.org> thanks, -- Shuah
--- a/drivers/usb/usbip/usbip_common.c +++ b/drivers/usb/usbip/usbip_common.c @@ -324,11 +324,6 @@ int usbip_recv(struct socket *sock, void } while (msg_data_left(&msg)); if (usbip_dbg_flag_xmit) { - if (!in_interrupt()) - pr_debug("%-10s:", current->comm); - else - pr_debug("interrupt :"); - pr_debug("receiving....\n"); usbip_dump_buffer(buf, size); pr_debug("received, osize %d ret %d size %zd total %d\n",