All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Cc: linux-can <linux-can@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode()
Date: Mon, 25 Oct 2021 21:06:51 +0200	[thread overview]
Message-ID: <20211025190651.p4ivcrqinknmwuu5@pengutronix.de> (raw)
In-Reply-To: <CAMZ6RqLw+B8ZioOyMFzha67Om3c8eKEK4P53U9xHiVxB4NBhkA@mail.gmail.com>

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

On 26.10.2021 02:22:36, Vincent MAILHOL wrote:
> Welcome back on the mailing list, hope you had some nice
> holidays!

Thanks was really nice, good weather, 1000km of cycling and hanging
around in Vienna. :D

> And also thanks a lot for your support over the last
> few months on my other series to introduce the TDC netlink
> interface :)

The pleasure is on my side, working with you!

> Le lun. 25 oct. 2021 à 03:30, Marc Kleine-Budde <mkl@pengutronix.de> a écrit :
> >
> > On 09.10.2021 22:13:02, Vincent Mailhol wrote:
> > > The statically enabled features of a CAN controller can be retrieved
> > > using below formula:
> > >
> > > | u32 ctrlmode_static = priv->ctrlmode & ~priv->ctrlmode_supported;
> > >
> > > As such, there is no need to store this information. This patch remove
> > > the field ctrlmode_static of struct can_priv and provides, in
> > > replacement, the inline function can_get_static_ctrlmode() which
> > > returns the same value.
> > >
> > > A condition sine qua non for this to work is that the controller
> > > static modes should never be set in can_priv::ctrlmode_supported. This
> > > is already the case for existing drivers, however, we added a warning
> > > message in can_set_static_ctrlmode() to check that.
> >
> > Please make the can_set_static_ctrlmode to return an error in case of a
> > problem. Adjust the drivers using the function is this patch, too.
> 
> I didn't do so initially because this is more a static
> configuration issue that should only occur during
> development. Nonetheless, what you suggest is really simple.
> 
> I will just split the patch in two: one of the setter and one for
> the getter and address your comments.

Fine with me. Most important thing is, that the kernel compiles after
each patch.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2021-10-25 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 13:13 [PATCH v2 0/3] report the controller capabilities through the netlink interface Vincent Mailhol
2021-10-09 13:13 ` [PATCH v2 1/3] can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode() Vincent Mailhol
2021-10-24 18:30   ` Marc Kleine-Budde
2021-10-25 17:22     ` Vincent MAILHOL
2021-10-25 19:06       ` Marc Kleine-Budde [this message]
2021-10-26  1:36         ` Vincent MAILHOL
2021-10-09 13:13 ` [PATCH v2 2/3] can: dev: reorder struct can_priv members for better packing Vincent Mailhol
2021-10-09 13:13 ` [PATCH v2 3/3] can: netlink: report the CAN controller mode supported flags 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=20211025190651.p4ivcrqinknmwuu5@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=netdev@vger.kernel.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.