[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202205271506.b3ILwQFq-lkp@intel.com>
Date: Fri, 27 May 2022 15:54:57 +0800
From: kernel test robot <lkp@...el.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>, netdev@...r.kernel.org
Cc: kbuild-all@...ts.01.org, Jiawen Wu <jiawenwu@...stnetic.com>
Subject: Re: [PATCH net-next v3] net: txgbe: Add build support for txgbe
Hi Jiawen,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Jiawen-Wu/net-txgbe-Add-build-support-for-txgbe/20220527-143401
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 7e062cda7d90543ac8c7700fc7c5527d0c0f22ad
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220527/202205271506.b3ILwQFq-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
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/b2d691a438052d44a1ec82c4b9e23ecf5514a579
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jiawen-Wu/net-txgbe-Add-build-support-for-txgbe/20220527-143401
git checkout b2d691a438052d44a1ec82c4b9e23ecf5514a579
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/net/ethernet/wangxun/txgbe/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c: In function 'txgbe_probe':
>> drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:93:26: warning: variable 'hw' set but not used [-Wunused-but-set-variable]
93 | struct txgbe_hw *hw = NULL;
| ^~
vim +/hw +93 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
77
78 /**
79 * txgbe_probe - Device Initialization Routine
80 * @pdev: PCI device information struct
81 * @ent: entry in txgbe_pci_tbl
82 *
83 * Returns 0 on success, negative on failure
84 *
85 * txgbe_probe initializes an adapter identified by a pci_dev structure.
86 * The OS initialization, configuring of the adapter private structure,
87 * and a hardware reset occur.
88 **/
89 static int txgbe_probe(struct pci_dev *pdev,
90 const struct pci_device_id __always_unused *ent)
91 {
92 struct txgbe_adapter *adapter = NULL;
> 93 struct txgbe_hw *hw = NULL;
94 struct net_device *netdev;
95 int err, pci_using_dac;
96
97 err = pci_enable_device_mem(pdev);
98 if (err)
99 return err;
100
101 if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
102 !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
103 pci_using_dac = 1;
104 } else {
105 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
106 if (err) {
107 err = dma_set_coherent_mask(&pdev->dev,
108 DMA_BIT_MASK(32));
109 if (err) {
110 dev_err(&pdev->dev,
111 "No usable DMA configuration, aborting\n");
112 goto err_dma;
113 }
114 }
115 pci_using_dac = 0;
116 }
117
118 err = pci_request_selected_regions(pdev,
119 pci_select_bars(pdev, IORESOURCE_MEM),
120 txgbe_driver_name);
121 if (err) {
122 dev_err(&pdev->dev,
123 "pci_request_selected_regions failed 0x%x\n", err);
124 goto err_pci_reg;
125 }
126
127 pci_enable_pcie_error_reporting(pdev);
128 pci_set_master(pdev);
129 /* errata 16 */
130 pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL,
131 PCI_EXP_DEVCTL_READRQ,
132 0x1000);
133
134 netdev = devm_alloc_etherdev_mqs(&pdev->dev,
135 sizeof(struct txgbe_adapter),
136 TXGBE_MAX_TX_QUEUES,
137 TXGBE_MAX_RX_QUEUES);
138 if (!netdev) {
139 err = -ENOMEM;
140 goto err_alloc_etherdev;
141 }
142
143 SET_NETDEV_DEV(netdev, &pdev->dev);
144
145 adapter = netdev_priv(netdev);
146 adapter->netdev = netdev;
147 adapter->pdev = pdev;
148 hw = &adapter->hw;
149
150 adapter->io_addr = devm_ioremap(&pdev->dev,
151 pci_resource_start(pdev, 0),
152 pci_resource_len(pdev, 0));
153 if (!adapter->io_addr) {
154 err = -EIO;
155 goto err_ioremap;
156 }
157
158 /* setup the private structure */
159 err = txgbe_sw_init(adapter);
160 if (err)
161 goto err_sw_init;
162
163 if (pci_using_dac)
164 netdev->features |= NETIF_F_HIGHDMA;
165
166 pci_set_drvdata(pdev, adapter);
167
168 return 0;
169
170 err_sw_init:
171 devm_iounmap(&pdev->dev, adapter->io_addr);
172 err_ioremap:
173 err_alloc_etherdev:
174 pci_release_selected_regions(pdev,
175 pci_select_bars(pdev, IORESOURCE_MEM));
176 err_pci_reg:
177 err_dma:
178 pci_disable_device(pdev);
179 return err;
180 }
181
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists