netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: "Martin Hundebøll" <martin@geanix.com>,
	"Chandrasekar Ramakrishnan" <rcsekar@samsung.com>,
	"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Markus Schneider-Pargmann" <msp@baylibre.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] can: m_can: don't enable transceiver when probing
Date: Fri, 21 Jun 2024 11:27:35 +0200	[thread overview]
Message-ID: <20240621-witty-alluring-fossa-9e37f9-mkl@pengutronix.de> (raw)
In-Reply-To: <20240621091908.juhoeb7zfo4zhsga@maili.marvell.com>

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

On 21.06.2024 14:49:08, Ratheesh Kannoth wrote:
> On 2024-06-07 at 16:22:08, Martin Hundebøll (martin@geanix.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   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2024-06-21  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 10:52 [PATCH v4] can: m_can: don't enable transceiver when probing Martin Hundebøll
2024-06-12 12:07 ` Markus Schneider-Pargmann
2024-06-21  8:32 ` Marc Kleine-Budde
2024-06-21  9:19 ` Ratheesh Kannoth
2024-06-21  9:27   ` Marc Kleine-Budde [this message]

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=20240621-witty-alluring-fossa-9e37f9-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=martin@geanix.com \
    --cc=msp@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rcsekar@samsung.com \
    --cc=rkannoth@marvell.com \
    /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;
as well as URLs for NNTP newsgroup(s).