Commit c9642374 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

USB: fix unsafe USB_SS_MAX_STREAMS() definition

Macro arguments used in expressions need to be enclosed in parenthesis
to avoid unpleasant surprises.
Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 969e3033
......@@ -584,7 +584,7 @@ struct usb_ss_ep_comp_descriptor {
#define USB_DT_SS_EP_COMP_SIZE 6
/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
#define USB_SS_MAX_STREAMS(p) (1 << (p & 0x1f))
#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f))
/*-------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment