Re: [PATCH 1/3] net: ethernet: ti: cpdma: fix lockup in cpdma_ctlr_destroy()

From: kbuild test robot
Date: Fri Jul 22 2016 - 12:05:27 EST


Hi,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.7-rc7 next-20160722]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Grygorii-Strashko/drivers-net-cpsw-fix-driver-loading-unloading/20160722-221708
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All warnings (new ones prefixed by >>):

drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_ctlr_destroy':
>> drivers/net/ethernet/ti/davinci_cpdma.c:433:16: warning: unused variable 'flags' [-Wunused-variable]
unsigned long flags;
^

vim +/flags +433 drivers/net/ethernet/ti/davinci_cpdma.c

ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 417 dma_reg_read(ctlr, CPDMA_DMASTATUS));
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 418 dev_info(dev, "CPDMA: rxbuffofs: %x",
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 419 dma_reg_read(ctlr, CPDMA_RXBUFFOFS));
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 420 }
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 421
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 422 for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++)
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 423 if (ctlr->channels[i])
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 424 cpdma_chan_dump(ctlr->channels[i]);
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 425
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 426 spin_unlock_irqrestore(&ctlr->lock, flags);
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 427 return 0;
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 428 }
32a6d90b drivers/net/ethernet/ti/davinci_cpdma.c Arnd Bergmann 2012-04-20 429 EXPORT_SYMBOL_GPL(cpdma_ctlr_dump);
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 430
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 431 int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 432 {
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 @433 unsigned long flags;
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 434 int ret = 0, i;
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 435
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 436 if (!ctlr)
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 437 return -EINVAL;
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 438
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 439 if (ctlr->state != CPDMA_STATE_IDLE)
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 440 cpdma_ctlr_stop(ctlr);
ef8c2dab drivers/net/davinci_cpdma.c Cyril Chemparathy 2010-09-15 441

:::::: The code at line 433 was first introduced by commit
:::::: ef8c2dab01b6e30c4b2ca3ea3b8db33430493589 net: davinci_emac: separate out cpdma code

:::::: TO: Cyril Chemparathy <cyril@xxxxxx>
:::::: CC: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data