mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
udc: lpc32xx: fix 64-bit compiler warning
gcc points out a suspicious cast from a pointer to an 'int' when compile-testing on 64-bit architectures. drivers/usb/gadget/udc/lpc32xx_udc.c: In function ‘udc_pop_fifo’: drivers/usb/gadget/udc/lpc32xx_udc.c:1156:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/usb/gadget/udc/lpc32xx_udc.c: In function ‘udc_stuff_fifo’: drivers/usb/gadget/udc/lpc32xx_udc.c:1257:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] The code works find, but it's easy enough to change the cast to a uintptr_t to shut up that warning. Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cfbb8a84c2
commit
792e559e94
@@ -45,7 +45,7 @@ config USB_AT91
|
||||
|
||||
config USB_LPC32XX
|
||||
tristate "LPC32XX USB Peripheral Controller"
|
||||
depends on ARCH_LPC32XX
|
||||
depends on ARCH_LPC32XX || COMPILE_TEST
|
||||
depends on I2C
|
||||
select USB_ISP1301
|
||||
help
|
||||
|
||||
@@ -1151,7 +1151,7 @@ static void udc_pop_fifo(struct lpc32xx_udc *udc, u8 *data, u32 bytes)
|
||||
u32 *p32, tmp, cbytes;
|
||||
|
||||
/* Use optimal data transfer method based on source address and size */
|
||||
switch (((u32) data) & 0x3) {
|
||||
switch (((uintptr_t) data) & 0x3) {
|
||||
case 0: /* 32-bit aligned */
|
||||
p32 = (u32 *) data;
|
||||
cbytes = (bytes & ~0x3);
|
||||
@@ -1252,7 +1252,7 @@ static void udc_stuff_fifo(struct lpc32xx_udc *udc, u8 *data, u32 bytes)
|
||||
u32 *p32, tmp, cbytes;
|
||||
|
||||
/* Use optimal data transfer method based on source address and size */
|
||||
switch (((u32) data) & 0x3) {
|
||||
switch (((uintptr_t) data) & 0x3) {
|
||||
case 0: /* 32-bit aligned */
|
||||
p32 = (u32 *) data;
|
||||
cbytes = (bytes & ~0x3);
|
||||
|
||||
Reference in New Issue
Block a user