Skip to content

Commit

Permalink
usbip: Remove in_interrupt() check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Cc: Valentina Manea <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
a-darwish authored and gregkh committed Oct 28, 2020
1 parent b02dfc1 commit 9ca9a25
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/usb/usbip/usbip_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,6 @@ int usbip_recv(struct socket *sock, void *buf, int size)
} 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",
Expand Down

0 comments on commit 9ca9a25

Please sign in to comment.