[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240621-witty-alluring-fossa-9e37f9-mkl@pengutronix.de>
Date: Fri, 21 Jun 2024 11:27:35 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: Martin Hundebøll <martin@...nix.com>,
Chandrasekar Ramakrishnan <rcsekar@...sung.com>, Vincent Mailhol <mailhol.vincent@...adoo.fr>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Markus Schneider-Pargmann <msp@...libre.com>, linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] can: m_can: don't enable transceiver when probing
On 21.06.2024 14:49:08, Ratheesh Kannoth wrote:
> On 2024-06-07 at 16:22:08, Martin Hundebøll (martin@...nix.com) wrote:
> >
> > - usleep_range(1, 5);
> > + /* Then clear the it again. */
> > + ret = m_can_cccr_update_bits(cdev, CCCR_NISO, 0);
> > + if (ret) {
> > + dev_err(cdev->dev, "failed to revert the NON-ISO bit in CCCR\n");
> > + return ret;
> > }
> >
> > - /* Clear NISO */
> > - cccr_reg &= ~(CCCR_NISO);
> > - m_can_write(cdev, M_CAN_CCCR, cccr_reg);
> > + ret = m_can_config_disable(cdev);
> > + if (ret)
> > + return ret;
> if ret != 0, then the function returns "true", right ?
> as indicated by the below comment. But as i understand,
> this is an error case and should return "false"
AFAICS: This patch changes the return type to int. It Returns 1 if the
bit is writable, 0 if it is not, or negative on error. The caller has
been adopted, too.
Marc
> > - /* return false if time out (-ETIMEDOUT), else return true */
> > - return !niso_timeout;
> > + return niso == 0;
> > }
> >
> >
>
>
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists