linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vincent Mailhol <mailhol@kernel.org>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 1/3] can: calc_bittiming: get rid of the incorrect "nominal" word
Date: Sat, 15 Nov 2025 13:19:28 +0100	[thread overview]
Message-ID: <20251115-devout-alligator-of-witchcraft-656ceb-mkl@pengutronix.de> (raw)
In-Reply-To: <a84c66ff-c5ad-418e-afb6-31f114eda17c@kernel.org>

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

On 15.11.2025 12:14:31, Vincent Mailhol wrote:
> >> ---
> >>  drivers/net/can/dev/calc_bittiming.c | 30 ++++++++++++++----------------
> >>  1 file changed, 14 insertions(+), 16 deletions(-)
> >>
> >> diff --git a/drivers/net/can/dev/calc_bittiming.c b/drivers/net/can/dev/calc_bittiming.c
> >> index 268ec6fa7c49..222117596704 100644
> >> --- a/drivers/net/can/dev/calc_bittiming.c
> >> +++ b/drivers/net/can/dev/calc_bittiming.c
> >> @@ -24,7 +24,7 @@
> >>   */
> >>  static int
> >>  can_update_sample_point(const struct can_bittiming_const *btc,
> >> -			const unsigned int sample_point_nominal, const unsigned int tseg,
> >> +			unsigned int sp_origin, unsigned int tseg,
> >
> > Please don't remove the "const".
>
> I always considered it silly to tag a scalar parameter as const. Because C
> passes the function argument by value, it is pretty meaningless. But I guess
> this change is out of scope. I will restore this in the next version.

Here they are both the reference values in the right format. I know I
don't want to change them. So I've marked them as const, to document
this.

regards,
Marc

-- 
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:[~2025-11-15 12:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-02 22:01 [PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding Vincent Mailhol
2025-11-02 22:01 ` [PATCH RFC 1/3] can: calc_bittiming: get rid of the incorrect "nominal" word Vincent Mailhol
2025-11-12  9:08   ` Marc Kleine-Budde
2025-11-15 11:14     ` Vincent Mailhol
2025-11-15 12:19       ` Marc Kleine-Budde [this message]
2025-11-17 15:32       ` Stéphane Grosjean
2025-11-17 16:34         ` Marc Kleine-Budde
2025-11-02 22:01 ` [PATCH RFC 2/3] can: calc_bittiming: add can_calc_sample_point_nrz() Vincent Mailhol
2025-11-02 22:01 ` [PATCH RFC 3/3] can: calc_bittiming: add can_calc_sample_point_pwm() Vincent Mailhol
2025-11-04  7:59 ` [PATCH RFC 0/3] can: calc_bittiming: add sample point calculation for PWM encoding Oliver Hartkopp
2025-11-15 11:17 ` Vincent Mailhol
2025-11-15 11:50   ` Oliver Hartkopp

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=20251115-devout-alligator-of-witchcraft-656ceb-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=socketcan@hartkopp.net \
    /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).