Linux CAN drivers development
 help / color / mirror / Atom feed
* [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used
@ 2020-11-18 18:20 kernel test robot
  2020-11-19  8:44 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-11-18 18:20 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: kbuild-all, linux-can

[-- Attachment #1: Type: text/plain, Size: 3246 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
head:   5974dc5581b5ae0ef7bef0916ec99663d4b78c9d
commit: cad1b206dc43c9324409af29a0d3eb6dc8fa6a02 [20/27] can: flexcan: flexcan_rx_offload_setup(): factor out mailbox and rx-offload setup into separate function
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.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://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?id=cad1b206dc43c9324409af29a0d3eb6dc8fa6a02
        git remote add mkl-can-next https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
        git fetch --no-tags mkl-can-next testing
        git checkout cad1b206dc43c9324409af29a0d3eb6dc8fa6a02
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

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/can/flexcan.c: In function 'flexcan_rx_offload_setup':
>> drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
    1389 |  int err;
         |      ^~~

vim +/err +1389 drivers/net/can/flexcan.c

  1385	
  1386	static int flexcan_rx_offload_setup(struct net_device *dev)
  1387	{
  1388		struct flexcan_priv *priv = netdev_priv(dev);
> 1389		int err;
  1390	
  1391		if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
  1392			priv->mb_size = sizeof(struct flexcan_mb) + CANFD_MAX_DLEN;
  1393		else
  1394			priv->mb_size = sizeof(struct flexcan_mb) + CAN_MAX_DLEN;
  1395		priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
  1396				 (sizeof(priv->regs->mb[1]) / priv->mb_size);
  1397	
  1398		if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP)
  1399			priv->tx_mb_reserved =
  1400				flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_TIMESTAMP);
  1401		else
  1402			priv->tx_mb_reserved =
  1403				flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
  1404		priv->tx_mb_idx = priv->mb_count - 1;
  1405		priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
  1406		priv->tx_mask = FLEXCAN_IFLAG_MB(priv->tx_mb_idx);
  1407	
  1408		priv->offload.mailbox_read = flexcan_mailbox_read;
  1409	
  1410		if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
  1411			priv->offload.mb_first = FLEXCAN_RX_MB_OFF_TIMESTAMP_FIRST;
  1412			priv->offload.mb_last = priv->mb_count - 2;
  1413	
  1414			priv->rx_mask = GENMASK_ULL(priv->offload.mb_last,
  1415						    priv->offload.mb_first);
  1416			err = can_rx_offload_add_timestamp(dev, &priv->offload);
  1417		} else {
  1418			priv->rx_mask = FLEXCAN_IFLAG_RX_FIFO_OVERFLOW |
  1419				FLEXCAN_IFLAG_RX_FIFO_AVAILABLE;
  1420			err = can_rx_offload_add_fifo(dev, &priv->offload,
  1421						      FLEXCAN_NAPI_WEIGHT);
  1422		}
  1423	
  1424		return 0;
  1425	}
  1426	

---
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: 66124 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used
  2020-11-18 18:20 [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used kernel test robot
@ 2020-11-19  8:44 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2020-11-19  8:44 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-can


[-- Attachment #1.1: Type: text/plain, Size: 1838 bytes --]

On 11/18/20 7:20 PM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
> head:   5974dc5581b5ae0ef7bef0916ec99663d4b78c9d
> commit: cad1b206dc43c9324409af29a0d3eb6dc8fa6a02 [20/27] can: flexcan: flexcan_rx_offload_setup(): factor out mailbox and rx-offload setup into separate function
> config: xtensa-allyesconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 9.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://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?id=cad1b206dc43c9324409af29a0d3eb6dc8fa6a02
>         git remote add mkl-can-next https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
>         git fetch --no-tags mkl-can-next testing
>         git checkout cad1b206dc43c9324409af29a0d3eb6dc8fa6a02
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 
> 
> 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/can/flexcan.c: In function 'flexcan_rx_offload_setup':
>>> drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
>     1389 |  int err;
>          |      ^~~

Fixed.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-19  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 18:20 [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used kernel test robot
2020-11-19  8:44 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox