Hi Luo, Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Luo-bin/hinic-add-some-ethtool-ops-support/20200628-203913 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 491f14db45dc7fc08ffe00ea6881615638dd159c config: i386-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> All warnings (new ones prefixed by >>): drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function '__hinic_set_coalesce': >> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:742:31: warning: variable >> 'ori_tx_intr_coal' set but not used [-Wunused-but-set-variable] 742 | struct hinic_intr_coal_info *ori_tx_intr_coal = NULL; | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:741:31: warning: variable >> 'ori_rx_intr_coal' set but not used [-Wunused-but-set-variable] 741 | struct hinic_intr_coal_info *ori_rx_intr_coal = NULL; | ^~~~~~~~~~~~~~~~ vim +/ori_tx_intr_coal +742 drivers/net/ethernet/huawei/hinic/hinic_ethtool.c 737 738 static int __hinic_set_coalesce(struct net_device *netdev, 739 struct ethtool_coalesce *coal, u16 queue) 740 { > 741 struct hinic_intr_coal_info *ori_rx_intr_coal = NULL; > 742 struct hinic_intr_coal_info *ori_tx_intr_coal = NULL; 743 struct hinic_dev *nic_dev = netdev_priv(netdev); 744 struct hinic_intr_coal_info rx_intr_coal = {0}; 745 struct hinic_intr_coal_info tx_intr_coal = {0}; 746 char obj_str[OBJ_STR_MAX_LEN] = {0}; 747 bool set_rx_coal = false; 748 bool set_tx_coal = false; 749 int err; 750 751 err = is_coalesce_exceed_limit(coal); 752 if (err) 753 return err; 754 755 if (coal->rx_coalesce_usecs || coal->rx_max_coalesced_frames) { 756 rx_intr_coal.coalesce_timer_cfg = 757 (u8)(coal->rx_coalesce_usecs / COALESCE_TIMER_CFG_UNIT); 758 rx_intr_coal.pending_limt = (u8)(coal->rx_max_coalesced_frames / 759 COALESCE_PENDING_LIMIT_UNIT); 760 set_rx_coal = true; 761 } 762 763 if (coal->tx_coalesce_usecs || coal->tx_max_coalesced_frames) { 764 tx_intr_coal.coalesce_timer_cfg = 765 (u8)(coal->tx_coalesce_usecs / COALESCE_TIMER_CFG_UNIT); 766 tx_intr_coal.pending_limt = (u8)(coal->tx_max_coalesced_frames / 767 COALESCE_PENDING_LIMIT_UNIT); 768 set_tx_coal = true; 769 } 770 771 if (queue == COALESCE_ALL_QUEUE) { 772 ori_rx_intr_coal = &nic_dev->rx_intr_coalesce[0]; 773 ori_tx_intr_coal = &nic_dev->tx_intr_coalesce[0]; 774 err = snprintf(obj_str, OBJ_STR_MAX_LEN, "for netdev"); 775 } else { 776 ori_rx_intr_coal = &nic_dev->rx_intr_coalesce[queue]; 777 ori_tx_intr_coal = &nic_dev->tx_intr_coalesce[queue]; 778 err = snprintf(obj_str, OBJ_STR_MAX_LEN, "for queue %d", queue); 779 } 780 if (err <= 0 || err >= OBJ_STR_MAX_LEN) { 781 netif_err(nic_dev, drv, netdev, "Failed to snprintf string, function return(%d) and dest_len(%d)\n", 782 err, OBJ_STR_MAX_LEN); 783 return -EFAULT; 784 } 785 786 /* setting coalesce timer or pending limit to zero will disable 787 * coalesce 788 */ 789 if (set_rx_coal && (!rx_intr_coal.coalesce_timer_cfg || 790 !rx_intr_coal.pending_limt)) 791 netif_warn(nic_dev, drv, netdev, "RX coalesce will be disabled\n"); 792 if (set_tx_coal && (!tx_intr_coal.coalesce_timer_cfg || 793 !tx_intr_coal.pending_limt)) 794 netif_warn(nic_dev, drv, netdev, "TX coalesce will be disabled\n"); 795 796 if (set_rx_coal) { 797 err = __set_hw_coal_param(nic_dev, &rx_intr_coal, queue, true); 798 if (err) 799 return err; 800 } 801 if (set_tx_coal) { 802 err = __set_hw_coal_param(nic_dev, &tx_intr_coal, queue, false); 803 if (err) 804 return err; 805 } 806 return 0; 807 } 808 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip