All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 3/3] can: c_can: cache frames to operate as a true FIFO
Date: Mon, 07 Jun 2021 17:53:37 +0800	[thread overview]
Message-ID: <202106071714.hnJiSNGH-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210606201705.31307-4-dariobin@libero.it>
References: <20210606201705.31307-4-dariobin@libero.it>
TO: Dario Binacchi <dariobin@libero.it>
TO: linux-kernel(a)vger.kernel.org
CC: Gianluca Falavigna <gianluca.falavigna@inwind.it>
CC: Dario Binacchi <dariobin@libero.it>
CC: Jakub Kicinski <kuba@kernel.org>
CC: "Marc Kleine-Budde" <mkl@pengutronix.de>
CC: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Tong Zhang <ztong0001@gmail.com>
CC: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
CC: Wolfgang Grandegger <wg@grandegger.com>
CC: YueHaibing <yuehaibing@huawei.com>

Hi Dario,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on linux/master net/master linus/master v5.13-rc5]
[cannot apply to net-next/master sparc-next/master next-20210604]
[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/Dario-Binacchi/can-c_can-cache-frames-to-operate-as-a-true-FIFO/20210607-042041
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: h8300-randconfig-s031-20210607 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/19123a06211906a51c0647c1a427b6549635172f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dario-Binacchi/can-c_can-cache-frames-to-operate-as-a-true-FIFO/20210607-042041
        git checkout 19123a06211906a51c0647c1a427b6549635172f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=h8300 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/net/can/c_can/c_can.c:491:9: sparse: sparse: context imbalance in 'c_can_start_xmit' - different lock contexts for basic block

vim +/c_can_start_xmit +491 drivers/net/can/c_can/c_can.c

5098c41911740f Dario Binacchi    2021-06-06  452  
881ff67ad45041 Bhupesh Sharma    2011-02-13  453  static netdev_tx_t c_can_start_xmit(struct sk_buff *skb,
881ff67ad45041 Bhupesh Sharma    2011-02-13  454  				    struct net_device *dev)
881ff67ad45041 Bhupesh Sharma    2011-02-13  455  {
881ff67ad45041 Bhupesh Sharma    2011-02-13  456  	struct can_frame *frame = (struct can_frame *)skb->data;
35bdafb576c5c0 Thomas Gleixner   2014-04-11  457  	struct c_can_priv *priv = netdev_priv(dev);
5098c41911740f Dario Binacchi    2021-06-06  458  	struct c_can_tx_ring *tx_ring = &priv->tx;
19123a06211906 Dario Binacchi    2021-06-06  459  	u32 idx, obj, cmd = IF_COMM_TX;
881ff67ad45041 Bhupesh Sharma    2011-02-13  460  
881ff67ad45041 Bhupesh Sharma    2011-02-13  461  	if (can_dropped_invalid_skb(dev, skb))
881ff67ad45041 Bhupesh Sharma    2011-02-13  462  		return NETDEV_TX_OK;
35bdafb576c5c0 Thomas Gleixner   2014-04-11  463  
5098c41911740f Dario Binacchi    2021-06-06  464  	if (c_can_tx_busy(priv, tx_ring))
5098c41911740f Dario Binacchi    2021-06-06  465  		return NETDEV_TX_BUSY;
5098c41911740f Dario Binacchi    2021-06-06  466  
5098c41911740f Dario Binacchi    2021-06-06  467  	idx = c_can_get_tx_head(tx_ring);
5098c41911740f Dario Binacchi    2021-06-06  468  	tx_ring->head++;
5098c41911740f Dario Binacchi    2021-06-06  469  	if (c_can_get_tx_free(tx_ring) == 0)
881ff67ad45041 Bhupesh Sharma    2011-02-13  470  		netif_stop_queue(dev);
5098c41911740f Dario Binacchi    2021-06-06  471  
19123a06211906 Dario Binacchi    2021-06-06  472  	spin_lock_bh(&priv->tx_lock);
19123a06211906 Dario Binacchi    2021-06-06  473  	if (idx < c_can_get_tx_tail(tx_ring))
19123a06211906 Dario Binacchi    2021-06-06  474  		cmd &= ~IF_COMM_TXRQST; /* Cache the message */
19123a06211906 Dario Binacchi    2021-06-06  475  	else
19123a06211906 Dario Binacchi    2021-06-06  476  		spin_unlock_bh(&priv->tx_lock);
5098c41911740f Dario Binacchi    2021-06-06  477  
172f6d3a031b5e Marc Kleine-Budde 2021-03-04  478  	/* Store the message in the interface so we can call
35bdafb576c5c0 Thomas Gleixner   2014-04-11  479  	 * can_put_echo_skb(). We must do this before we enable
35bdafb576c5c0 Thomas Gleixner   2014-04-11  480  	 * transmit as we might race against do_tx().
35bdafb576c5c0 Thomas Gleixner   2014-04-11  481  	 */
939415973fdfb2 Thomas Gleixner   2014-04-11  482  	c_can_setup_tx_object(dev, IF_TX, frame, idx);
c7b74967799b1a Oliver Hartkopp   2020-11-20  483  	priv->dlc[idx] = frame->len;
1dcb6e57db8334 Vincent Mailhol   2021-01-11  484  	can_put_echo_skb(skb, dev, idx, 0);
19123a06211906 Dario Binacchi    2021-06-06  485  	obj = idx + priv->msg_obj_tx_first;
19123a06211906 Dario Binacchi    2021-06-06  486  	c_can_object_put(dev, IF_TX, obj, cmd);
35bdafb576c5c0 Thomas Gleixner   2014-04-11  487  
19123a06211906 Dario Binacchi    2021-06-06  488  	if (spin_is_locked(&priv->tx_lock))
19123a06211906 Dario Binacchi    2021-06-06  489  		spin_unlock_bh(&priv->tx_lock);
881ff67ad45041 Bhupesh Sharma    2011-02-13  490  
881ff67ad45041 Bhupesh Sharma    2011-02-13 @491  	return NETDEV_TX_OK;
881ff67ad45041 Bhupesh Sharma    2011-02-13  492  }
881ff67ad45041 Bhupesh Sharma    2011-02-13  493  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35002 bytes --]

             reply	other threads:[~2021-06-07  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  9:53 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-06 20:17 [PATCH 0/3] can: c_can: cache frames to operate as a true FIFO Dario Binacchi
2021-06-06 20:17 ` [PATCH 3/3] " Dario Binacchi
2021-05-09 12:43 [PATCH 0/3] " Dario Binacchi
2021-05-09 12:43 ` [PATCH 3/3] " Dario Binacchi
2021-05-10 12:25   ` Marc Kleine-Budde
2021-05-10 12:36     ` Marc Kleine-Budde
2021-05-13 11:23       ` Dario Binacchi

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=202106071714.hnJiSNGH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.