[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220912120210.6oc4tbb7xjxhjihc@pengutronix.de>
Date: Mon, 12 Sep 2022 14:02:10 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Oliver Hartkopp <socketcan@...tkopp.net>
Cc: Ziyang Xuan <william.xuanziyang@...wei.com>, edumazet@...gle.com,
kuba@...nel.org, linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] can: bcm: check the result of can_send() in
bcm_can_tx()
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 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists