• Arnd Bergmann's avatar
    staging/emxx_udc: fix 64-bit warnings · e7cfb390
    Arnd Bergmann authored
    ARCH_SHMOBILE is coming to arm64, which creates new warnings in allmodconfig:
    
    drivers/staging/emxx_udc/emxx_udc.c: In function '_nbu2ss_out_dma':
    drivers/staging/emxx_udc/emxx_udc.c:843:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      _nbu2ss_writel(&preg->EP_DCR[num].EP_TADR, (u32)pBuffer);
    
    This is clearly a mistake from confusing a dma_addr_t with a pointer,
    so the fix is to use the correct types in two places.
    
    The third warning of this kind is a check for an unaligned pointer,
    which should be done by casting the pointer to uintptr_t, not int.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e7cfb390
emxx_udc.c 76.7 KB