From: kernel test robot <lkp@intel.com>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH 1/2] mt76: mt7915: add MSI support
Date: Fri, 7 May 2021 23:35:28 +0800 [thread overview]
Message-ID: <202105072315.AaJwf9H7-lkp@intel.com> (raw)
In-Reply-To: <20210507104556.20997-1-nbd@nbd.name>
[-- Attachment #1: Type: text/plain, Size: 5295 bytes --]
Hi Felix,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on next-20210507]
[cannot apply to wireless-drivers/master v5.12]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Felix-Fietkau/mt76-mt7915-add-MSI-support/20210507-184735
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: arm64-randconfig-r013-20210507 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a3a8a1a15b524d91b5308db68e9d293b34cd88dd)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/057445f40716fc2ee5b1c4aa7d02023c1a92be86
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Felix-Fietkau/mt76-mt7915-add-MSI-support/20210507-184735
git checkout 057445f40716fc2ee5b1c4aa7d02023c1a92be86
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7915/pci.c:267:6: warning: variable 'dev' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (ret < 0)
^~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/pci.c:300:20: note: uninitialized use occurs here
mt76_free_device(&dev->mt76);
^~~
drivers/net/wireless/mediatek/mt76/mt7915/pci.c:267:2: note: remove the 'if' if its condition is always false
if (ret < 0)
^~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/pci.c:240:24: note: initialize the variable 'dev' to silence this warning
struct mt7915_dev *dev;
^
= NULL
1 warning generated.
vim +267 drivers/net/wireless/mediatek/mt76/mt7915/pci.c
218
219 static int mt7915_pci_probe(struct pci_dev *pdev,
220 const struct pci_device_id *id)
221 {
222 static const struct mt76_driver_ops drv_ops = {
223 /* txwi_size = txd size + txp size */
224 .txwi_size = MT_TXD_SIZE + sizeof(struct mt7915_txp),
225 .drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ |
226 MT_DRV_AMSDU_OFFLOAD,
227 .survey_flags = SURVEY_INFO_TIME_TX |
228 SURVEY_INFO_TIME_RX |
229 SURVEY_INFO_TIME_BSS_RX,
230 .token_size = MT7915_TOKEN_SIZE,
231 .tx_prepare_skb = mt7915_tx_prepare_skb,
232 .tx_complete_skb = mt7915_tx_complete_skb,
233 .rx_skb = mt7915_queue_rx_skb,
234 .rx_poll_complete = mt7915_rx_poll_complete,
235 .sta_ps = mt7915_sta_ps,
236 .sta_add = mt7915_mac_sta_add,
237 .sta_remove = mt7915_mac_sta_remove,
238 .update_survey = mt7915_update_channel,
239 };
240 struct mt7915_dev *dev;
241 struct mt76_dev *mdev;
242 int ret;
243
244 ret = pcim_enable_device(pdev);
245 if (ret)
246 return ret;
247
248 ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
249 if (ret)
250 return ret;
251
252 pci_set_master(pdev);
253
254 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
255 if (ret)
256 return ret;
257
258 if (id->device == 0x7916)
259 return mt7915_pci_hif2_probe(pdev);
260
261 mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7915_ops,
262 &drv_ops);
263 if (!mdev)
264 return -ENOMEM;
265
266 ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
> 267 if (ret < 0)
268 goto free;
269
270 dev = container_of(mdev, struct mt7915_dev, mt76);
271
272 ret = mt7915_mmio_init(mdev, pcim_iomap_table(pdev)[0], pdev->irq);
273 if (ret)
274 goto error;
275
276 tasklet_setup(&dev->irq_tasklet, mt7915_irq_tasklet);
277
278 mt76_wr(dev, MT_INT_MASK_CSR, 0);
279
280 /* master switch of PCIe tnterrupt enable */
281 mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
282
283 ret = devm_request_irq(mdev->dev, pdev->irq, mt7915_irq_handler,
284 IRQF_SHARED, KBUILD_MODNAME, dev);
285 if (ret)
286 goto error;
287
288 mt7915_pci_init_hif2(dev);
289
290 ret = mt7915_register_device(dev);
291 if (ret)
292 goto free_irq;
293
294 return 0;
295 free_irq:
296 devm_free_irq(mdev->dev, pdev->irq, dev);
297 error:
298 pci_free_irq_vectors(pdev);
299 free:
300 mt76_free_device(&dev->mt76);
301
302 return ret;
303 }
304
---
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: 40684 bytes --]
prev parent reply other threads:[~2021-05-07 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 10:45 [PATCH 1/2] mt76: mt7915: add MSI support Felix Fietkau
2021-05-07 10:45 ` [PATCH 2/2] mt76: mt7915: disable ASPM Felix Fietkau
2021-05-07 15:35 ` kernel test robot [this message]
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=202105072315.AaJwf9H7-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox