CC: [email protected]
CC: [email protected]
TO: Parav Pandit <[email protected]>
CC: Saeed Mahameed <[email protected]>
CC: Leon Romanovsky <[email protected]>
CC: Shay Drory <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   eccea80be2576dee642bc6cab20f1a242d58a08c
commit: 5958a6fad623ad3b67a9e4d8dbd5f1874cc7039e net/mlx5: Reorganize current 
and maximal capabilities to be per-type
date:   4 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 4 months ago
config: i386-randconfig-m031-20211211 
(https://download.01.org/0day-ci/archive/20211212/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c:231 
mlx5_sf_dev_table_create() warn: should '1 << 
(((__builtin_bswap32(((*((dev->caps.hca[0]->cur) + (($expr_0x7f761af90ec0(30)) 
/ 32))))) >> (32 - 8 - (($expr_0x7f761af91460(30)) & 31))) & (((1 << 8) - 1))) 
+ 12)' be a 64 bit type?

vim +231 drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c

90d010b8634b89 Parav Pandit 2020-12-11  209  
90d010b8634b89 Parav Pandit 2020-12-11  210  void 
mlx5_sf_dev_table_create(struct mlx5_core_dev *dev)
90d010b8634b89 Parav Pandit 2020-12-11  211  {
90d010b8634b89 Parav Pandit 2020-12-11  212     struct mlx5_sf_dev_table *table;
90d010b8634b89 Parav Pandit 2020-12-11  213     unsigned int max_sfs;
90d010b8634b89 Parav Pandit 2020-12-11  214     int err;
90d010b8634b89 Parav Pandit 2020-12-11  215  
90d010b8634b89 Parav Pandit 2020-12-11  216     if (!mlx5_sf_dev_supported(dev) 
|| !mlx5_vhca_event_supported(dev))
90d010b8634b89 Parav Pandit 2020-12-11  217             return;
90d010b8634b89 Parav Pandit 2020-12-11  218  
90d010b8634b89 Parav Pandit 2020-12-11  219     table = kzalloc(sizeof(*table), 
GFP_KERNEL);
90d010b8634b89 Parav Pandit 2020-12-11  220     if (!table) {
90d010b8634b89 Parav Pandit 2020-12-11  221             err = -ENOMEM;
90d010b8634b89 Parav Pandit 2020-12-11  222             goto table_err;
90d010b8634b89 Parav Pandit 2020-12-11  223     }
90d010b8634b89 Parav Pandit 2020-12-11  224  
90d010b8634b89 Parav Pandit 2020-12-11  225     table->nb.notifier_call = 
mlx5_sf_dev_state_change_handler;
90d010b8634b89 Parav Pandit 2020-12-11  226     table->dev = dev;
90d010b8634b89 Parav Pandit 2020-12-11  227     if (MLX5_CAP_GEN(dev, 
max_num_sf))
90d010b8634b89 Parav Pandit 2020-12-11  228             max_sfs = 
MLX5_CAP_GEN(dev, max_num_sf);
90d010b8634b89 Parav Pandit 2020-12-11  229     else
90d010b8634b89 Parav Pandit 2020-12-11  230             max_sfs = 1 << 
MLX5_CAP_GEN(dev, log_max_sf);
90d010b8634b89 Parav Pandit 2020-12-11 @231     table->sf_bar_length = 1 << 
(MLX5_CAP_GEN(dev, log_min_sf_size) + 12);
90d010b8634b89 Parav Pandit 2020-12-11  232     table->base_address = 
pci_resource_start(dev->pdev, 2);
90d010b8634b89 Parav Pandit 2020-12-11  233     table->max_sfs = max_sfs;
90d010b8634b89 Parav Pandit 2020-12-11  234     xa_init(&table->devices);
90d010b8634b89 Parav Pandit 2020-12-11  235     dev->priv.sf_dev_table = table;
90d010b8634b89 Parav Pandit 2020-12-11  236  
90d010b8634b89 Parav Pandit 2020-12-11  237     err = 
mlx5_vhca_event_notifier_register(dev, &table->nb);
90d010b8634b89 Parav Pandit 2020-12-11  238     if (err)
90d010b8634b89 Parav Pandit 2020-12-11  239             goto vhca_err;
90d010b8634b89 Parav Pandit 2020-12-11  240     err = 
mlx5_sf_dev_vhca_arm_all(table);
90d010b8634b89 Parav Pandit 2020-12-11  241     if (err)
90d010b8634b89 Parav Pandit 2020-12-11  242             goto arm_err;
90d010b8634b89 Parav Pandit 2020-12-11  243     mlx5_core_dbg(dev, "SF DEV: max 
sf devices=%d\n", max_sfs);
90d010b8634b89 Parav Pandit 2020-12-11  244     return;
90d010b8634b89 Parav Pandit 2020-12-11  245  
90d010b8634b89 Parav Pandit 2020-12-11  246  arm_err:
90d010b8634b89 Parav Pandit 2020-12-11  247     
mlx5_vhca_event_notifier_unregister(dev, &table->nb);
90d010b8634b89 Parav Pandit 2020-12-11  248  vhca_err:
90d010b8634b89 Parav Pandit 2020-12-11  249     table->max_sfs = 0;
90d010b8634b89 Parav Pandit 2020-12-11  250     kfree(table);
90d010b8634b89 Parav Pandit 2020-12-11  251     dev->priv.sf_dev_table = NULL;
90d010b8634b89 Parav Pandit 2020-12-11  252  table_err:
90d010b8634b89 Parav Pandit 2020-12-11  253     mlx5_core_err(dev, "SF DEV 
table create err = %d\n", err);
90d010b8634b89 Parav Pandit 2020-12-11  254  }
90d010b8634b89 Parav Pandit 2020-12-11  255  

:::::: The code at line 231 was first introduced by commit
:::::: 90d010b8634b89a97ca3b7aa6a88fd566fc77717 net/mlx5: SF, Add auxiliary 
device support

:::::: TO: Parav Pandit <[email protected]>
:::::: CC: Saeed Mahameed <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to