lkml.org 
[lkml]   [2014]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 10/11] hwa-hc: Fix probable mask then right shift defect
    Date
    Precedence of & and >> is not the same and is not left to right.
    shift has higher precedence and should be done after the mask.

    Add parentheses around the mask.

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    drivers/usb/host/hwa-hc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
    index d0d8fad..1db0626 100644
    --- a/drivers/usb/host/hwa-hc.c
    +++ b/drivers/usb/host/hwa-hc.c
    @@ -607,7 +607,7 @@ found:
    wa->wa_descr = wa_descr = (struct usb_wa_descriptor *) hdr;
    if (le16_to_cpu(wa_descr->bcdWAVersion) > 0x0100)
    dev_warn(dev, "Wire Adapter v%d.%d newer than groked v1.0\n",
    - le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00 >> 8,
    + (le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00) >> 8,
    le16_to_cpu(wa_descr->bcdWAVersion) & 0x00ff);
    result = 0;
    error:
    --
    2.1.2


    \
     
     \ /
      Last update: 2014-10-27 07:03    [W:3.481 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site