From: kernel test robot <lkp@intel.com>
To: Dave Ertman <david.m.ertman@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Subject: [linux-next:master 3723/6929] drivers/net/ethernet/intel/ice/ice_dcb_nl.c:66:6: error: variable 'bwcfg' set but not used
Date: Sun, 10 Oct 2021 18:30:05 +0800 [thread overview]
Message-ID: <202110101857.YSdB3T5U-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6407 bytes --]
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@intel.com>
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@intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48140 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 3723/6929] drivers/net/ethernet/intel/ice/ice_dcb_nl.c:66:6: error: variable 'bwcfg' set but not used
Date: Sun, 10 Oct 2021 18:30:05 +0800 [thread overview]
Message-ID: <202110101857.YSdB3T5U-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6508 bytes --]
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@intel.com>
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@intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48140 bytes --]
next reply other threads:[~2021-10-10 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 10:30 kernel test robot [this message]
2021-10-10 10:30 ` [linux-next:master 3723/6929] drivers/net/ethernet/intel/ice/ice_dcb_nl.c:66:6: error: variable 'bwcfg' set but not used kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202110101857.YSdB3T5U-lkp@intel.com \
--to=lkp@intel.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=david.m.ertman@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.