]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: fix unsafe USB_SS_MAX_STREAMS() definition
authorDmitry Torokhov <dtor@vmware.com>
Wed, 23 Feb 2011 22:38:20 +0000 (14:38 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Feb 2011 19:40:01 +0000 (11:40 -0800)
Macro arguments used in expressions need to be enclosed in parenthesis
to avoid unpleasant surprises.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/usb/ch9.h

index ab461948b579e02bea2f62b4d4407769ef850090..34316ba05f29a7e1bc8d10fece733c6f32c74484 100644 (file)
@@ -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))
 
 /*-------------------------------------------------------------------------*/