Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445436

drivers/usb/usbip/vudc_rx.c:145: possible bad bitmask ?

From David Binderman <linuxdev.baldrick@gmail.com>
Newsgroups linux.kernel
Subject drivers/usb/usbip/vudc_rx.c:145: possible bad bitmask ?
Date 2016-07-18 14:30 +0200
Message-ID <rWfQm-65G-39@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello there,

drivers/usb/usbip/vudc_rx.c:145:27: warning: result of β€˜11 << 30’
requires 35 bits to represent, but β€˜int’ only has 32 bits
[-Wshift-overflow=]

Source code is

    urb_p->urb->pipe &= ~(11 << 30);

Maybe better code

    urb_p->urb->pipe &= ~(11UL << 30);

Regards

David Binderman

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

drivers/usb/usbip/vudc_rx.c:145: possible bad bitmask ? David Binderman <linuxdev.baldrick@gmail.com> - 2016-07-18 14:30 +0200

csiph-web