Hi Daniel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    
https://github.com/intel-lab-lkp/linux/commits/Daniel-Jurgens/virtio-pci-Expose-generic-device-capability-operations/20250828-024128
base:   net-next/main
patch link:    
https://lore.kernel.org/r/20250827183852.2471-9-danielj%40nvidia.com
patch subject: [PATCH net-next 08/11] virtio_net: Implement IPv4 ethtool flow 
rules
config: x86_64-randconfig-121-20250828 
(https://download.01.org/0day-ci/archive/20250829/202508290723.hs6bn2g9-...@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 
87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250829/202508290723.hs6bn2g9-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202508290723.hs6bn2g9-...@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/net/virtio_net/virtio_net_ff.c: note: in included file (through 
include/linux/virtio_admin.h):
   include/uapi/linux/virtio_net_ff.h:47:48: sparse: sparse: array of flexible 
structures
   include/uapi/linux/virtio_net_ff.h:67:48: sparse: sparse: array of flexible 
structures
   drivers/net/virtio_net/virtio_net_ff.c:180:24: sparse: sparse: restricted 
__le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:257:27: sparse: sparse: incorrect 
type in assignment (different base types) @@     expected restricted __le16 
[usertype] vq_index @@     got unsigned long long @@
   drivers/net/virtio_net/virtio_net_ff.c:257:27: sparse:     expected 
restricted __le16 [usertype] vq_index
   drivers/net/virtio_net/virtio_net_ff.c:257:27: sparse:     got unsigned long 
long
>> drivers/net/virtio_net/virtio_net_ff.c:361:32: sparse: sparse: incorrect 
>> type in assignment (different base types) @@     expected restricted __be16 
>> [usertype] h_proto @@     got int @@
   drivers/net/virtio_net/virtio_net_ff.c:361:32: sparse:     expected 
restricted __be16 [usertype] h_proto
   drivers/net/virtio_net/virtio_net_ff.c:361:32: sparse:     got int
   drivers/net/virtio_net/virtio_net_ff.c:506:24: sparse: sparse: restricted 
__le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:635:13: sparse: sparse: restricted 
__le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:635:13: sparse: sparse: cast to 
restricted __le32
   drivers/net/virtio_net/virtio_net_ff.c:639:35: sparse: sparse: incorrect 
type in assignment (different base types) @@     expected restricted __le32 
[usertype] groups_limit @@     got int @@
   drivers/net/virtio_net/virtio_net_ff.c:639:35: sparse:     expected 
restricted __le32 [usertype] groups_limit
   drivers/net/virtio_net/virtio_net_ff.c:639:35: sparse:     got int

vim +361 drivers/net/virtio_net/virtio_net_ff.c

   347  
   348  static void setup_eth_hdr_key_mask(struct virtio_net_ff_selector 
*selector,
   349                                    u8 *key,
   350                                    const struct ethtool_rx_flow_spec *fs,
   351                                    int num_hdrs)
   352  {
   353          struct ethhdr *eth_m = (struct ethhdr *)&selector->mask;
   354          struct ethhdr *eth_k = (struct ethhdr *)key;
   355  
   356          selector->type = VIRTIO_NET_FF_MASK_TYPE_ETH;
   357          selector->length = sizeof(struct ethhdr);
   358  
   359          if (num_hdrs > 1) {
   360                  eth_m->h_proto = cpu_to_be16(0xffff);
 > 361                  eth_k->h_proto = ETH_P_IP;
   362          } else {
   363                  memcpy(eth_m, &fs->m_u.ether_spec, sizeof(*eth_m));
   364                  memcpy(eth_k, &fs->h_u.ether_spec, sizeof(*eth_k));
   365          }
   366  }
   367  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to