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 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