Hi Daniel,

kernel test robot noticed the following build errors:

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

url:    
https://github.com/intel-lab-lkp/linux/commits/Daniel-Jurgens/virtio_pci-Remove-supported_cap-size-build-assert/20251014-004146
base:   net-next/main
patch link:    
https://lore.kernel.org/r/20251013152742.619423-6-danielj%40nvidia.com
patch subject: [PATCH net-next v4 05/12] virtio_net: Query and set flow filter 
caps
config: i386-buildonly-randconfig-003-20251014 
(https://download.01.org/0day-ci/archive/20251014/[email protected]/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/20251014/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/net/virtio_net.c:6868:32: error: called object type 'unsigned int' 
>> is not a function or function pointer
    6868 |                 if (sel->length > MAX_SEL_LEN()) {
         |                                   ~~~~~~~~~~~^
   1 error generated.


vim +6868 drivers/net/virtio_net.c

  6788  
  6789  static void virtnet_ff_init(struct virtnet_ff *ff, struct virtio_device 
*vdev)
  6790  {
  6791          size_t ff_mask_size = sizeof(struct 
virtio_net_ff_cap_mask_data) +
  6792                                sizeof(struct virtio_net_ff_selector) *
  6793                                VIRTIO_NET_FF_MASK_TYPE_MAX;
  6794          struct virtio_admin_cmd_query_cap_id_result *cap_id_list;
  6795          struct virtio_net_ff_selector *sel;
  6796          int err;
  6797          int i;
  6798  
  6799          cap_id_list = kzalloc(sizeof(*cap_id_list), GFP_KERNEL);
  6800          if (!cap_id_list)
  6801                  return;
  6802  
  6803          err = virtio_admin_cap_id_list_query(vdev, cap_id_list);
  6804          if (err)
  6805                  goto err_cap_list;
  6806  
  6807          if (!(VIRTIO_CAP_IN_LIST(cap_id_list,
  6808                                   VIRTIO_NET_FF_RESOURCE_CAP) &&
  6809                VIRTIO_CAP_IN_LIST(cap_id_list,
  6810                                   VIRTIO_NET_FF_SELECTOR_CAP) &&
  6811                VIRTIO_CAP_IN_LIST(cap_id_list,
  6812                                   VIRTIO_NET_FF_ACTION_CAP)))
  6813                  goto err_cap_list;
  6814  
  6815          ff->ff_caps = kzalloc(sizeof(*ff->ff_caps), GFP_KERNEL);
  6816          if (!ff->ff_caps)
  6817                  goto err_cap_list;
  6818  
  6819          err = virtio_admin_cap_get(vdev,
  6820                                     VIRTIO_NET_FF_RESOURCE_CAP,
  6821                                     ff->ff_caps,
  6822                                     sizeof(*ff->ff_caps));
  6823  
  6824          if (err)
  6825                  goto err_ff;
  6826  
  6827          /* VIRTIO_NET_FF_MASK_TYPE start at 1 */
  6828          for (i = 1; i <= VIRTIO_NET_FF_MASK_TYPE_MAX; i++)
  6829                  ff_mask_size += get_mask_size(i);
  6830  
  6831          ff->ff_mask = kzalloc(ff_mask_size, GFP_KERNEL);
  6832          if (!ff->ff_mask)
  6833                  goto err_ff;
  6834  
  6835          err = virtio_admin_cap_get(vdev,
  6836                                     VIRTIO_NET_FF_SELECTOR_CAP,
  6837                                     ff->ff_mask,
  6838                                     ff_mask_size);
  6839  
  6840          if (err)
  6841                  goto err_ff_mask;
  6842  
  6843          ff->ff_actions = kzalloc(sizeof(*ff->ff_actions) +
  6844                                          VIRTIO_NET_FF_ACTION_MAX,
  6845                                          GFP_KERNEL);
  6846          if (!ff->ff_actions)
  6847                  goto err_ff_mask;
  6848  
  6849          err = virtio_admin_cap_get(vdev,
  6850                                     VIRTIO_NET_FF_ACTION_CAP,
  6851                                     ff->ff_actions,
  6852                                     sizeof(*ff->ff_actions) + 
VIRTIO_NET_FF_ACTION_MAX);
  6853  
  6854          if (err)
  6855                  goto err_ff_action;
  6856  
  6857          err = virtio_admin_cap_set(vdev,
  6858                                     VIRTIO_NET_FF_RESOURCE_CAP,
  6859                                     ff->ff_caps,
  6860                                     sizeof(*ff->ff_caps));
  6861          if (err)
  6862                  goto err_ff_action;
  6863  
  6864          ff_mask_size = sizeof(struct virtio_net_ff_cap_mask_data);
  6865          sel = &ff->ff_mask->selectors[0];
  6866  
  6867          for (i = 0; i < ff->ff_mask->count; i++) {
> 6868                  if (sel->length > MAX_SEL_LEN()) {
  6869                          err = -EINVAL;
  6870                          goto err_ff_action;
  6871                  }
  6872                  ff_mask_size += sizeof(struct virtio_net_ff_selector) + 
sel->length;
  6873                  sel = (void *)sel + sizeof(*sel) + sel->length;
  6874          }
  6875  
  6876          err = virtio_admin_cap_set(vdev,
  6877                                     VIRTIO_NET_FF_SELECTOR_CAP,
  6878                                     ff->ff_mask,
  6879                                     ff_mask_size);
  6880          if (err)
  6881                  goto err_ff_action;
  6882  
  6883          err = virtio_admin_cap_set(vdev,
  6884                                     VIRTIO_NET_FF_ACTION_CAP,
  6885                                     ff->ff_actions,
  6886                                     sizeof(*ff->ff_actions) + 
VIRTIO_NET_FF_ACTION_MAX);
  6887          if (err)
  6888                  goto err_ff_action;
  6889  
  6890          ff->vdev = vdev;
  6891          ff->ff_supported = true;
  6892  
  6893          kfree(cap_id_list);
  6894  
  6895          return;
  6896  
  6897  err_ff_action:
  6898          kfree(ff->ff_actions);
  6899  err_ff_mask:
  6900          kfree(ff->ff_mask);
  6901  err_ff:
  6902          kfree(ff->ff_caps);
  6903  err_cap_list:
  6904          kfree(cap_id_list);
  6905  }
  6906  

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

Reply via email to