From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v3] can: m_can: don't enable transceiver when probing
Date: Mon, 3 Jun 2024 16:14:58 +0800 [thread overview]
Message-ID: <202406031513.ByfTbHww-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240530105801.3930087-1-martin@geanix.com>
References: <20240530105801.3930087-1-martin@geanix.com>
TO: "Martin Hundebøll" <martin@geanix.com>
TO: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
TO: "Marc Kleine-Budde" <mkl@pengutronix.de>
TO: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
TO: "David S. Miller" <davem@davemloft.net>
CC: netdev@vger.kernel.org
TO: Eric Dumazet <edumazet@google.com>
TO: Jakub Kicinski <kuba@kernel.org>
TO: Paolo Abeni <pabeni@redhat.com>
CC: "Markus Schneider-Pargmann" <msp@baylibre.com>
CC: "Martin Hundebøll" <martin@geanix.com>
CC: linux-can@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Hi Martin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on linus/master v6.10-rc2 next-20240603]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Martin-Hundeb-ll/can-m_can-don-t-enable-transceiver-when-probing/20240530-185906
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
patch link: https://lore.kernel.org/r/20240530105801.3930087-1-martin%40geanix.com
patch subject: [PATCH v3] can: m_can: don't enable transceiver when probing
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-r081-20240603 (https://download.01.org/0day-ci/archive/20240603/202406031513.ByfTbHww-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202406031513.ByfTbHww-lkp@intel.com/
New smatch warnings:
drivers/net/can/m_can/m_can.c:1725 m_can_dev_setup() error: uninitialized symbol 'err'.
Old smatch warnings:
drivers/net/can/m_can/m_can.c:2075 m_can_open() warn: 'dev->irq' from request_threaded_irq() not released on lines: 2075.
drivers/net/can/m_can/m_can.c:2075 m_can_open() warn: 'dev->irq' from request_irq() not released on lines: 2075.
vim +/err +1725 drivers/net/can/m_can/m_can.c
b03cfc5bb0e11f Mario Huettel 2017-04-08 1670
3b464affd89821 Marc Kleine-Budde 2020-12-12 1671 static int m_can_dev_setup(struct m_can_classdev *cdev)
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1672 {
3b464affd89821 Marc Kleine-Budde 2020-12-12 1673 struct net_device *dev = cdev->net;
e96c73eab56aed Martin Hundebøll 2024-05-30 1674 int m_can_version, err, niso;
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1675
3b464affd89821 Marc Kleine-Budde 2020-12-12 1676 m_can_version = m_can_check_core_release(cdev);
b03cfc5bb0e11f Mario Huettel 2017-04-08 1677 /* return if unsupported version */
b03cfc5bb0e11f Mario Huettel 2017-04-08 1678 if (!m_can_version) {
3b464affd89821 Marc Kleine-Budde 2020-12-12 1679 dev_err(cdev->dev, "Unsupported version number: %2d",
5e520edd91f0cd Faiz Abbas 2018-01-16 1680 m_can_version);
5e520edd91f0cd Faiz Abbas 2018-01-16 1681 return -EINVAL;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1682 }
b03cfc5bb0e11f Mario Huettel 2017-04-08 1683
3b464affd89821 Marc Kleine-Budde 2020-12-12 1684 if (!cdev->is_peripheral)
b48b89f9c189d2 Jakub Kicinski 2022-09-27 1685 netif_napi_add(dev, &cdev->napi, m_can_poll);
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1686
b03cfc5bb0e11f Mario Huettel 2017-04-08 1687 /* Shared properties of all M_CAN versions */
3b464affd89821 Marc Kleine-Budde 2020-12-12 1688 cdev->version = m_can_version;
3b464affd89821 Marc Kleine-Budde 2020-12-12 1689 cdev->can.do_set_mode = m_can_set_mode;
3b464affd89821 Marc Kleine-Budde 2020-12-12 1690 cdev->can.do_get_berr_counter = m_can_get_berr_counter;
6cfda7fbebe8a4 Oliver Hartkopp 2015-01-05 1691
b03cfc5bb0e11f Mario Huettel 2017-04-08 1692 /* Set M_CAN supported operations */
3b464affd89821 Marc Kleine-Budde 2020-12-12 1693 cdev->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1694 CAN_CTRLMODE_LISTENONLY |
80646733f11c2e Dong Aisheng 2014-11-18 1695 CAN_CTRLMODE_BERR_REPORTING |
fb7d6a81c22017 Pankaj Sharma 2019-10-21 1696 CAN_CTRLMODE_FD |
fb7d6a81c22017 Pankaj Sharma 2019-10-21 1697 CAN_CTRLMODE_ONE_SHOT;
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1698
b03cfc5bb0e11f Mario Huettel 2017-04-08 1699 /* Set properties depending on M_CAN version */
3b464affd89821 Marc Kleine-Budde 2020-12-12 1700 switch (cdev->version) {
b03cfc5bb0e11f Mario Huettel 2017-04-08 1701 case 30:
b03cfc5bb0e11f Mario Huettel 2017-04-08 1702 /* CAN_CTRLMODE_FD_NON_ISO is fixed with M_CAN IP v3.0.x */
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1703 err = can_set_static_ctrlmode(dev, CAN_CTRLMODE_FD_NON_ISO);
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1704 if (err)
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1705 return err;
d6da7881020f9b Jarkko Nikula 2022-05-12 1706 cdev->can.bittiming_const = &m_can_bittiming_const_30X;
d6da7881020f9b Jarkko Nikula 2022-05-12 1707 cdev->can.data_bittiming_const = &m_can_data_bittiming_const_30X;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1708 break;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1709 case 31:
b03cfc5bb0e11f Mario Huettel 2017-04-08 1710 /* CAN_CTRLMODE_FD_NON_ISO is fixed with M_CAN IP v3.1.x */
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1711 err = can_set_static_ctrlmode(dev, CAN_CTRLMODE_FD_NON_ISO);
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1712 if (err)
7d4a101c0bd3c6 Vincent Mailhol 2021-12-14 1713 return err;
d6da7881020f9b Jarkko Nikula 2022-05-12 1714 cdev->can.bittiming_const = &m_can_bittiming_const_31X;
d6da7881020f9b Jarkko Nikula 2022-05-12 1715 cdev->can.data_bittiming_const = &m_can_data_bittiming_const_31X;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1716 break;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1717 case 32:
5c7d55bded77da Pankaj Sharma 2020-11-26 1718 case 33:
5c7d55bded77da Pankaj Sharma 2020-11-26 1719 /* Support both MCAN version v3.2.x and v3.3.0 */
d6da7881020f9b Jarkko Nikula 2022-05-12 1720 cdev->can.bittiming_const = &m_can_bittiming_const_31X;
d6da7881020f9b Jarkko Nikula 2022-05-12 1721 cdev->can.data_bittiming_const = &m_can_data_bittiming_const_31X;
f524f829b75a7d Dan Murphy 2019-05-09 1722
e96c73eab56aed Martin Hundebøll 2024-05-30 1723 niso = m_can_niso_supported(cdev);
e96c73eab56aed Martin Hundebøll 2024-05-30 1724 if (niso < 0)
e96c73eab56aed Martin Hundebøll 2024-05-30 @1725 return err;
e96c73eab56aed Martin Hundebøll 2024-05-30 1726 if (niso)
e96c73eab56aed Martin Hundebøll 2024-05-30 1727 cdev->can.ctrlmode_supported |= CAN_CTRLMODE_FD_NON_ISO;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1728 break;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1729 default:
3b464affd89821 Marc Kleine-Budde 2020-12-12 1730 dev_err(cdev->dev, "Unsupported version number: %2d",
3b464affd89821 Marc Kleine-Budde 2020-12-12 1731 cdev->version);
5e520edd91f0cd Faiz Abbas 2018-01-16 1732 return -EINVAL;
b03cfc5bb0e11f Mario Huettel 2017-04-08 1733 }
b03cfc5bb0e11f Mario Huettel 2017-04-08 1734
e96c73eab56aed Martin Hundebøll 2024-05-30 1735 /* Forcing standby mode should be redunant, as the chip should be in
e96c73eab56aed Martin Hundebøll 2024-05-30 1736 * standby after a reset. Write the INIT bit anyways, should the chip
e96c73eab56aed Martin Hundebøll 2024-05-30 1737 * be configured by previous stage.
e96c73eab56aed Martin Hundebøll 2024-05-30 1738 */
e96c73eab56aed Martin Hundebøll 2024-05-30 1739 return m_can_cccr_update_bits(cdev, CCCR_INIT, CCCR_INIT);
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1740 }
e0d1f4816f2a7e Dong Aisheng 2014-07-16 1741
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-06-03 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 8:14 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-30 10:57 [PATCH v3] can: m_can: don't enable transceiver when probing Martin Hundebøll
2024-05-30 16:15 ` kernel test robot
2024-06-01 13:10 ` Simon Horman
2024-06-04 9:44 ` Dan Carpenter
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=202406031513.ByfTbHww-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.