Re: [PATCH 2/2] can: bcm: check the result of can_send() in bcm_can_tx()

From: Marc Kleine-Budde
Date: Mon Sep 12 2022 - 08:03:07 EST


On 08.09.2022 08:47:57, Oliver Hartkopp wrote:
> Sorry, but NACK.
>
> The curr_frame counter handles the sequence counter of multiplex messages.
>
> Even when this single send attempt failed the curr_frame counter has to
> continue.
>
> For that reason the comment about statistics *before* the curr_frame++ might
> be misleading.
>
> A potential improvement could be:
>
> if (!(can_send(skb, 1)))

Nitpick:
In the kernel we usually assign the return value to a variable first,
and evaluate this variable in the if ().

> op->frames_abs++;
>
> op->currframe++;

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