[linux-next:master 3723/6929] drivers/net/ethernet/intel/ice/ice_dcb_nl.c:66:6: error: variable 'bwcfg' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   683f29b781aeaab6bf302eeb2ef08a5e5f9d8a27
commit: 2a87bd73e50d1c71392c036b0b31c9b2418981d0 [3723/6929] ice: Add DSCP support
config: riscv-buildonly-randconfig-r005-20211010 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 903b30fea21f99d8f48fde4defcc838970e30ee1)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a87bd73e50d1c71392c036b0b31c9b2418981d0
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 2a87bd73e50d1c71392c036b0b31c9b2418981d0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/intel/ice/ice_dcb_nl.c:66:6: error: variable 'bwcfg' set but not used [-Werror,-Wunused-but-set-variable]
           int bwcfg = 0, bwrec = 0;
               ^
   1 error generated.


vim +/bwcfg +66 drivers/net/ethernet/intel/ice/ice_dcb_nl.c

b94b013eb62695 Dave Ertman      2019-11-06   56  
b94b013eb62695 Dave Ertman      2019-11-06   57  /**
b94b013eb62695 Dave Ertman      2019-11-06   58   * ice_dcbnl_setets - set IEEE ETS configuration
b94b013eb62695 Dave Ertman      2019-11-06   59   * @netdev: pointer to relevant netdev
b94b013eb62695 Dave Ertman      2019-11-06   60   * @ets: struct to hold ETS configuration
b94b013eb62695 Dave Ertman      2019-11-06   61   */
b94b013eb62695 Dave Ertman      2019-11-06   62  static int ice_dcbnl_setets(struct net_device *netdev, struct ieee_ets *ets)
b94b013eb62695 Dave Ertman      2019-11-06   63  {
b94b013eb62695 Dave Ertman      2019-11-06   64  	struct ice_pf *pf = ice_netdev_to_pf(netdev);
b94b013eb62695 Dave Ertman      2019-11-06   65  	struct ice_dcbx_cfg *new_cfg;
b94b013eb62695 Dave Ertman      2019-11-06  @66  	int bwcfg = 0, bwrec = 0;
2a87bd73e50d1c Dave Ertman      2021-08-06   67  	int err, i;
b94b013eb62695 Dave Ertman      2019-11-06   68  
b94b013eb62695 Dave Ertman      2019-11-06   69  	if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||
b94b013eb62695 Dave Ertman      2019-11-06   70  	    !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))
b94b013eb62695 Dave Ertman      2019-11-06   71  		return -EINVAL;
b94b013eb62695 Dave Ertman      2019-11-06   72  
fc2d1165d4a424 Chinh T Cao      2020-11-20   73  	new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg;
b94b013eb62695 Dave Ertman      2019-11-06   74  
b94b013eb62695 Dave Ertman      2019-11-06   75  	mutex_lock(&pf->tc_mutex);
b94b013eb62695 Dave Ertman      2019-11-06   76  
b94b013eb62695 Dave Ertman      2019-11-06   77  	new_cfg->etscfg.willing = ets->willing;
b94b013eb62695 Dave Ertman      2019-11-06   78  	new_cfg->etscfg.cbs = ets->cbs;
b94b013eb62695 Dave Ertman      2019-11-06   79  	ice_for_each_traffic_class(i) {
b94b013eb62695 Dave Ertman      2019-11-06   80  		new_cfg->etscfg.tcbwtable[i] = ets->tc_tx_bw[i];
b94b013eb62695 Dave Ertman      2019-11-06   81  		bwcfg += ets->tc_tx_bw[i];
b94b013eb62695 Dave Ertman      2019-11-06   82  		new_cfg->etscfg.tsatable[i] = ets->tc_tsa[i];
2a87bd73e50d1c Dave Ertman      2021-08-06   83  		if (new_cfg->pfc_mode == ICE_QOS_MODE_VLAN) {
2a87bd73e50d1c Dave Ertman      2021-08-06   84  			/* in DSCP mode up->tc mapping cannot change */
b94b013eb62695 Dave Ertman      2019-11-06   85  			new_cfg->etscfg.prio_table[i] = ets->prio_tc[i];
2a87bd73e50d1c Dave Ertman      2021-08-06   86  			new_cfg->etsrec.prio_table[i] = ets->reco_prio_tc[i];
2a87bd73e50d1c Dave Ertman      2021-08-06   87  		}
b94b013eb62695 Dave Ertman      2019-11-06   88  		new_cfg->etsrec.tcbwtable[i] = ets->tc_reco_bw[i];
b94b013eb62695 Dave Ertman      2019-11-06   89  		bwrec += ets->tc_reco_bw[i];
b94b013eb62695 Dave Ertman      2019-11-06   90  		new_cfg->etsrec.tsatable[i] = ets->tc_reco_tsa[i];
b94b013eb62695 Dave Ertman      2019-11-06   91  	}
b94b013eb62695 Dave Ertman      2019-11-06   92  
a29a912d448dbc Avinash Dayanand 2020-02-13   93  	if (ice_dcb_bwchk(pf, new_cfg)) {
a29a912d448dbc Avinash Dayanand 2020-02-13   94  		err = -EINVAL;
a29a912d448dbc Avinash Dayanand 2020-02-13   95  		goto ets_out;
a29a912d448dbc Avinash Dayanand 2020-02-13   96  	}
a29a912d448dbc Avinash Dayanand 2020-02-13   97  
2a87bd73e50d1c Dave Ertman      2021-08-06   98  	new_cfg->etscfg.maxtcs = pf->hw.func_caps.common_cap.maxtc;
b94b013eb62695 Dave Ertman      2019-11-06   99  
b94b013eb62695 Dave Ertman      2019-11-06  100  	if (!bwrec)
b94b013eb62695 Dave Ertman      2019-11-06  101  		new_cfg->etsrec.tcbwtable[0] = 100;
b94b013eb62695 Dave Ertman      2019-11-06  102  
b94b013eb62695 Dave Ertman      2019-11-06  103  	err = ice_pf_dcb_cfg(pf, new_cfg, true);
b94b013eb62695 Dave Ertman      2019-11-06  104  	/* return of zero indicates new cfg applied */
b94b013eb62695 Dave Ertman      2019-11-06  105  	if (err == ICE_DCB_HW_CHG_RST)
b94b013eb62695 Dave Ertman      2019-11-06  106  		ice_dcbnl_devreset(netdev);
b94b013eb62695 Dave Ertman      2019-11-06  107  	if (err == ICE_DCB_NO_HW_CHG)
b94b013eb62695 Dave Ertman      2019-11-06  108  		err = ICE_DCB_HW_CHG_RST;
b94b013eb62695 Dave Ertman      2019-11-06  109  
a29a912d448dbc Avinash Dayanand 2020-02-13  110  ets_out:
b94b013eb62695 Dave Ertman      2019-11-06  111  	mutex_unlock(&pf->tc_mutex);
b94b013eb62695 Dave Ertman      2019-11-06  112  	return err;
b94b013eb62695 Dave Ertman      2019-11-06  113  }
b94b013eb62695 Dave Ertman      2019-11-06  114  

:::::: The code at line 66 was first introduced by commit
:::::: b94b013eb6269526eeb3768101666ba6f526313e ice: Implement DCBNL support

:::::: TO: Dave Ertman <david.m.ertman@xxxxxxxxx>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux