From: kernel test robot <lkp@intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>, netdev@vger.kernel.org
Cc: kbuild-all@lists.01.org, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: Re: [PATCH net-next v3] net: txgbe: Add build support for txgbe
Date: Fri, 27 May 2022 15:54:57 +0800 [thread overview]
Message-ID: <202205271506.b3ILwQFq-lkp@intel.com> (raw)
In-Reply-To: <20220527063157.486686-1-jiawenwu@trustnetic.com>
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@intel.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
next prev parent reply other threads:[~2022-05-27 7:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 6:31 [PATCH net-next v3] net: txgbe: Add build support for txgbe Jiawen Wu
2022-05-27 7:54 ` kernel test robot [this message]
2022-05-27 16:44 ` Leon Romanovsky
[not found] ` <001501d873ec$e4f13a00$aed3ae00$@trustnetic.com>
2022-05-30 12:28 ` Leon Romanovsky
2022-05-28 1:29 ` Andrew Lunn
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=202205271506.b3ILwQFq-lkp@intel.com \
--to=lkp@intel.com \
--cc=jiawenwu@trustnetic.com \
--cc=kbuild-all@lists.01.org \
--cc=netdev@vger.kernel.org \
/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.