Re: [PATCH] can: mcp251x: Fix resume from sleep before interface was brought up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Schrempf,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on v5.12 next-20210504]
[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/Schrempf-Frieder/can-mcp251x-Fix-resume-from-sleep-before-interface-was-brought-up/20210505-000504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
config: x86_64-randconfig-r012-20210503 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/a6e3fbb55cde65e2254ce0351b92997d14724726
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Schrempf-Frieder/can-mcp251x-Fix-resume-from-sleep-before-interface-was-brought-up/20210505-000504
        git checkout a6e3fbb55cde65e2254ce0351b92997d14724726
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/net/can/spi/mcp251x.c:1244:1: warning: unused label 'out_clean' [-Wunused-label]
   out_clean:
   ^~~~~~~~~~
   drivers/net/can/spi/mcp251x.c:1335:17: warning: cast to smaller integer type 'enum mcp251x_model' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   priv->model = (enum mcp251x_model)match;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +/out_clean +1244 drivers/net/can/spi/mcp251x.c

e0000163e30eeb drivers/net/can/mcp251x.c     Christian Pellegrin 2009-11-02  1193  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1194  static int mcp251x_open(struct net_device *net)
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1195  {
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1196  	struct mcp251x_priv *priv = netdev_priv(net);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1197  	struct spi_device *spi = priv->spi;
6a07c2305ab200 drivers/net/can/spi/mcp251x.c Phil Elwell         2017-11-14  1198  	unsigned long flags = 0;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1199  	int ret;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1200  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1201  	ret = open_candev(net);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1202  	if (ret) {
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1203  		dev_err(&spi->dev, "unable to set initial baudrate!\n");
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1204  		return ret;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1205  	}
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1206  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1207  	mutex_lock(&priv->mcp_lock);
1ddff7da0faecf drivers/net/can/mcp251x.c     Alexander Shiyan    2013-08-19  1208  	mcp251x_power_enable(priv->transceiver, 1);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1209  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1210  	priv->force_quit = 0;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1211  	priv->tx_skb = NULL;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1212  	priv->tx_len = 0;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1213  
8de29a5c34a5ff drivers/net/can/spi/mcp251x.c Andy Shevchenko     2019-08-26  1214  	if (!dev_fwnode(&spi->dev))
6a07c2305ab200 drivers/net/can/spi/mcp251x.c Phil Elwell         2017-11-14  1215  		flags = IRQF_TRIGGER_FALLING;
6a07c2305ab200 drivers/net/can/spi/mcp251x.c Phil Elwell         2017-11-14  1216  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1217  	ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
3964576307edf4 drivers/net/can/spi/mcp251x.c Alexander Shiyan    2019-01-31  1218  				   flags | IRQF_ONESHOT, dev_name(&spi->dev),
3964576307edf4 drivers/net/can/spi/mcp251x.c Alexander Shiyan    2019-01-31  1219  				   priv);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1220  	if (ret) {
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1221  		dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1222  		goto out_close;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1223  	}
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1224  
8ce8c0abcba314 drivers/net/can/spi/mcp251x.c Timo Schlüßler      2019-10-11  1225  	ret = mcp251x_hw_wake(spi);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1226  	if (ret)
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1227  		goto out_free_wq;
aa68172235ba7a drivers/net/can/spi/mcp251x.c Marc Kleine-Budde   2017-12-06  1228  	ret = mcp251x_setup(net, spi);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1229  	if (ret)
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1230  		goto out_free_wq;
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1231  	ret = mcp251x_set_normal_mode(spi);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1232  	if (ret)
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1233  		goto out_free_wq;
eb072a9baebefe drivers/net/can/mcp251x.c     Fabio Baltieri      2012-12-18  1234  
eb072a9baebefe drivers/net/can/mcp251x.c     Fabio Baltieri      2012-12-18  1235  	can_led_event(net, CAN_LED_EVENT_OPEN);
eb072a9baebefe drivers/net/can/mcp251x.c     Fabio Baltieri      2012-12-18  1236  
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1237  	netif_wake_queue(net);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1238  	mutex_unlock(&priv->mcp_lock);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1239  
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1240  	return 0;
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1241  
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1242  out_free_wq:
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1243  	destroy_workqueue(priv->wq);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25 @1244  out_clean:
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1245  	free_irq(spi->irq, priv);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1246  	mcp251x_hw_sleep(spi);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1247  out_close:
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1248  	mcp251x_power_enable(priv->transceiver, 0);
375f755899b8fc drivers/net/can/spi/mcp251x.c Weitao Hou          2019-06-25  1249  	close_candev(net);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1250  	mutex_unlock(&priv->mcp_lock);
bf66f3736a945d drivers/net/can/mcp251x.c     Christian Pellegrin 2010-02-03  1251  	return ret;
e0000163e30eeb drivers/net/can/mcp251x.c     Christian Pellegrin 2009-11-02  1252  }
e0000163e30eeb drivers/net/can/mcp251x.c     Christian Pellegrin 2009-11-02  1253  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux