On 03/07/2020 18:46, kernel test robot wrote: > In file included from include/linux/skbuff.h:31, > from include/linux/if_ether.h:19, > from include/uapi/linux/ethtool.h:19, > from include/linux/ethtool.h:18, > from include/linux/netdevice.h:37, > from drivers/net/ethernet/sfc/net_driver.h:13, > from drivers/net/ethernet/sfc/ef100.c:12: > drivers/net/ethernet/sfc/ef100.c: In function > 'ef100_pci_parse_continue_entry': >>> include/linux/dma-mapping.h:139:25: warning: conversion from 'long long >>> unsigned int' to 'dma_addr_t' {aka 'unsigned int'} changes value from >>> '18446744073709551615' to '4294967295' [-Woverflow] > 139 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> drivers/net/ethernet/sfc/ef100.c:144:6: note: in expansion of macro >>> 'DMA_BIT_MASK' > 144 | DMA_BIT_MASK(ESF_GZ_TX_SEND_ADDR_WIDTH), > | ^~~~~~~~~~~~ I think this is spurious? DMA_BIT_MASK() looks likeit's intended to return a dma_addr_t, and the conversion does the right thing (truncate to 32 bits), so maybe all that's needed is some suitable annotation to make the compiler happy. Would casting explicitly to dma_addr_t do it?
-ed