* [PATCH] usb: core: Replace hardcoded check with inline function from usb.h
@ 2019-02-19 21:15 ` Keyur Patel
0 siblings, 0 replies; 2+ messages in thread
From: Keyur Patel @ 2019-02-19 21:15 UTC (permalink / raw)
Cc: Keyur Patel, Greg Kroah-Hartman, Oliver Neukum, Alan Stern,
Sebastian Andrzej Siewior, Paul Moore, Stephen Smalley,
Kees Cook, Eric W. Biederman, linux-usb, linux-kernel
From: Keyur Patel <iamkeyur96@gmail.com>
Expression (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN can be
replaced by usb_urb_dir_in(struct urb *urb) from usb.h for better
readability.
Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
drivers/usb/core/devio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index d65566341dd1..29e2ff055e6e 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -604,7 +604,7 @@ static void async_completed(struct urb *urb)
snoop(&urb->dev->dev, "urb complete\n");
snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length,
as->status, COMPLETE, NULL, 0);
- if ((urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN)
+ if (usb_urb_dir_in(urb))
snoop_urb_data(urb, urb->actual_length);
if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET &&
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* usb: core: Replace hardcoded check with inline function from usb.h
@ 2019-02-19 21:15 ` Keyur Patel
0 siblings, 0 replies; 2+ messages in thread
From: Keyur Patel @ 2019-02-19 21:15 UTC (permalink / raw)
Cc: Keyur Patel, Greg Kroah-Hartman, Oliver Neukum, Alan Stern,
Sebastian Andrzej Siewior, Paul Moore, Stephen Smalley,
Kees Cook, Eric W. Biederman, linux-usb, linux-kernel
From: Keyur Patel <iamkeyur96@gmail.com>
Expression (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN can be
replaced by usb_urb_dir_in(struct urb *urb) from usb.h for better
readability.
Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
drivers/usb/core/devio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index d65566341dd1..29e2ff055e6e 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -604,7 +604,7 @@ static void async_completed(struct urb *urb)
snoop(&urb->dev->dev, "urb complete\n");
snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length,
as->status, COMPLETE, NULL, 0);
- if ((urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN)
+ if (usb_urb_dir_in(urb))
snoop_urb_data(urb, urb->actual_length);
if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET &&
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-20 2:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 21:15 [PATCH] usb: core: Replace hardcoded check with inline function from usb.h Keyur Patel
2019-02-19 21:15 ` Keyur Patel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.