Linux CAN drivers development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: kbuild-all@lists.01.org, linux-can@vger.kernel.org
Subject: [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used
Date: Thu, 19 Nov 2020 02:20:49 +0800	[thread overview]
Message-ID: <202011190245.FnMHEVX9-lkp@intel.com> (raw)

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

             reply	other threads:[~2020-11-18 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 18:20 kernel test robot [this message]
2020-11-19  8:44 ` [mkl-can-next:testing 20/27] drivers/net/can/flexcan.c:1389:6: warning: variable 'err' set but not used Marc Kleine-Budde

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=202011190245.FnMHEVX9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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