[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5d39573d-ec51-8a35-041b-54afdbe1cb66@solarflare.com>
Date: Wed, 8 Jul 2020 20:16:27 +0100
From: Edward Cree <ecree@...arflare.com>
To: kernel test robot <lkp@...el.com>,
<linux-net-drivers@...arflare.com>, <davem@...emloft.net>
CC: <kbuild-all@...ts.01.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver
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
Powered by blists - more mailing lists