Hi Jakub,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url:
https://github.com/0day-ci/linux/commits/Jakub-Kicinski/ethtool-add-stand...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
9984c0bb22dcae688ef8588e2621133850ff49bc
config: x86_64-randconfig-s022-20200911 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1795:33:
sparse: sparse: incorrect type in assignment (different base types) @@ expected
unsigned long long [usertype] rx_pause_frames @@ got restricted __le64 [usertype]
rx_pause_frames @@
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1795:33: sparse: expected
unsigned long long [usertype] rx_pause_frames
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1795:33: sparse: got restricted
__le64 [usertype] rx_pause_frames
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1796:33: sparse: sparse: incorrect
type in assignment (different base types) @@ expected unsigned long long [usertype]
tx_pause_frames @@ got restricted __le64 [usertype] tx_pause_frames @@
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1796:33: sparse: expected
unsigned long long [usertype] tx_pause_frames
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1796:33: sparse: got restricted
__le64 [usertype] tx_pause_frames
#
https://github.com/0day-ci/linux/commit/c5c1d08b72fbfe88b0bb991fb4dded1f9...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Jakub-Kicinski/ethtool-add-standard-pause-stats/20200912-045257
git checkout c5c1d08b72fbfe88b0bb991fb4dded1f9d230280
vim +1795 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1780
1781 static void bnxt_get_pause_stats(struct net_device *dev,
1782 struct ethtool_pause_stats *epstat)
1783 {
1784 struct bnxt *bp = netdev_priv(dev);
1785 struct rx_port_stats *rx_stats;
1786 struct tx_port_stats *tx_stats;
1787
1788 if (BNXT_VF(bp) || !(bp->flags & BNXT_FLAG_PORT_STATS))
1789 return;
1790
1791 rx_stats = (void *)bp->port_stats.sw_stats;
1792 tx_stats = (void *)((unsigned long)bp->port_stats.sw_stats +
1793 BNXT_TX_PORT_STATS_BYTE_OFFSET);
1794
1795 epstat->rx_pause_frames = rx_stats->rx_pause_frames;
1796 epstat->tx_pause_frames = tx_stats->tx_pause_frames;
1797 }
1798
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org