Re: [PATCH RFC 1/3] can: calc_bittiming: get rid of the incorrect "nominal" word

From: Marc Kleine-Budde

Date: Sat Nov 15 2025 - 07:19:44 EST


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: signature.asc
Description: PGP signature