From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v15 1/3] can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces
Date: Sat, 10 Apr 2021 21:50:11 +0800 [thread overview]
Message-ID: <202104102147.tHlJA9NM-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5229 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210410095948.233305-2-mailhol.vincent@wanadoo.fr>
References: <20210410095948.233305-2-mailhol.vincent@wanadoo.fr>
TO: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
TO: "Marc Kleine-Budde" <mkl@pengutronix.de>
TO: linux-can(a)vger.kernel.org
CC: Jimmy Assarsson <extja@kvaser.com>
CC: Masahiro Yamada <masahiroy@kernel.org>
CC: linux-kernel(a)vger.kernel.org
CC: netdev(a)vger.kernel.org
CC: Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
CC: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Hi Vincent,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on next-20210409]
[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/Vincent-Mailhol/Introducing-ETAS-ES58X-CAN-USB-interfaces/20210410-180245
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/net/can/usb/etas_es58x/es58x_core.c:1802:5-24: atomic_dec_and_test variation before object free at line 1803.
drivers/net/can/usb/etas_es58x/es58x_core.c:1837:5-24: atomic_dec_and_test variation before object free at line 1838.
vim +1802 drivers/net/can/usb/etas_es58x/es58x_core.c
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1764
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1765 /**
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1766 * es58x_open() - Enable the network device.
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1767 * @netdev: CAN network device.
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1768 *
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1769 * Called when the network transitions to the up state. Allocate the
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1770 * URB resources if needed and open the channel.
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1771 *
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1772 * Return: zero on success, errno when any error occurs.
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1773 */
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1774 static int es58x_open(struct net_device *netdev)
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1775 {
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1776 struct es58x_device *es58x_dev = es58x_priv(netdev)->es58x_dev;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1777 int ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1778
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1779 if (atomic_inc_return(&es58x_dev->opened_channel_cnt) == 1) {
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1780 ret = es58x_alloc_rx_urbs(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1781 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1782 return ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1783
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1784 ret = es58x_set_realtime_diff_ns(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1785 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1786 goto free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1787 }
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1788
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1789 ret = open_candev(netdev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1790 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1791 goto free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1792
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1793 ret = es58x_dev->ops->enable_channel(es58x_priv(netdev));
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1794 if (ret)
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1795 goto free_urbs;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1796
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1797 netif_start_queue(netdev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1798
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1799 return ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1800
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1801 free_urbs:
1eb17b66e055c7 Vincent Mailhol 2021-04-10 @1802 if (atomic_dec_and_test(&es58x_dev->opened_channel_cnt))
1eb17b66e055c7 Vincent Mailhol 2021-04-10 @1803 es58x_free_urbs(es58x_dev);
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1804 netdev_err(netdev, "%s: Could not open the network device: %pe\n",
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1805 __func__, ERR_PTR(ret));
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1806
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1807 return ret;
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1808 }
1eb17b66e055c7 Vincent Mailhol 2021-04-10 1809
---
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: 65474 bytes --]
next reply other threads:[~2021-04-10 13:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 13:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-10 9:59 [PATCH v15 0/3] Introducing ETAS ES58X CAN USB interfaces Vincent Mailhol
2021-04-10 9:59 ` [PATCH v15 1/3] can: etas_es58x: add core support for " Vincent Mailhol
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=202104102147.tHlJA9NM-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.