Re: [PATCH v2 3/6] bnxt_en: Remove usage of ulp_id

kernel test robot
2022-10-26T00:57:40Z

[-- Attachment #1: Type: text/plain, Size: 3720 bytes --]

Hi Ajit,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.1-rc2 next-20221025]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Ajit-Khaparde/bnxt_en-Add-auxiliary-driver-support/20221026-023141
patch link: https://lore.kernel.org/r/20221025173110.33192-4-ajit.khaparde%40broadcom.com
patch subject: [PATCH v2 3/6] bnxt_en: Remove usage of ulp_id
config: x86_64-randconfig-a003-20221024 (attached as .config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/92c7d0e64af8a4eec67cc8b257c13256b441167d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Ajit-Khaparde/bnxt_en-Add-auxiliary-driver-support/20221026-023141
git checkout 92c7d0e64af8a4eec67cc8b257c13256b441167d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/infiniband/hw/bnxt_re/ drivers/net/ethernet/broadcom/bnxt/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c:319:15: warning: variable 'ulp' is uninitialized when used here [-Wuninitialized]
bnxt_ulp_get(ulp);
^~~
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c:308:22: note: initialize the variable 'ulp' to silence this warning
struct bnxt_ulp *ulp;
^
= NULL
1 warning generated.

vim +/ulp +319 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c

a588e4580a7ecb Michael Chan 2016-12-07 303
a588e4580a7ecb Michael Chan 2016-12-07 304 void bnxt_ulp_sriov_cfg(struct bnxt *bp, int num_vfs)
a588e4580a7ecb Michael Chan 2016-12-07 305 {
a588e4580a7ecb Michael Chan 2016-12-07 306 struct bnxt_en_dev *edev = bp->edev;
a588e4580a7ecb Michael Chan 2016-12-07 307 struct bnxt_ulp_ops *ops;
92c7d0e64af8a4 Ajit Khaparde 2022-10-25 308 struct bnxt_ulp *ulp;
a588e4580a7ecb Michael Chan 2016-12-07 309
a588e4580a7ecb Michael Chan 2016-12-07 310 if (!edev)
a588e4580a7ecb Michael Chan 2016-12-07 311 return;
a588e4580a7ecb Michael Chan 2016-12-07 312
a588e4580a7ecb Michael Chan 2016-12-07 313 rcu_read_lock();
a588e4580a7ecb Michael Chan 2016-12-07 314 ops = rcu_dereference(ulp->ulp_ops);
a588e4580a7ecb Michael Chan 2016-12-07 315 if (!ops || !ops->ulp_sriov_config) {
a588e4580a7ecb Michael Chan 2016-12-07 316 rcu_read_unlock();
92c7d0e64af8a4 Ajit Khaparde 2022-10-25 317 return;
a588e4580a7ecb Michael Chan 2016-12-07 318 }
a588e4580a7ecb Michael Chan 2016-12-07 @319 bnxt_ulp_get(ulp);
a588e4580a7ecb Michael Chan 2016-12-07 320 rcu_read_unlock();
a588e4580a7ecb Michael Chan 2016-12-07 321 ops->ulp_sriov_config(ulp->handle, num_vfs);
a588e4580a7ecb Michael Chan 2016-12-07 322 bnxt_ulp_put(ulp);
a588e4580a7ecb Michael Chan 2016-12-07 323 }
a588e4580a7ecb Michael Chan 2016-12-07 324

--
0-DAY CI Kernel Test Service
https://01.org/lkp

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42987 bytes --]