]> www.infradead.org Git - users/dwmw2/linux.git/commit
can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 11 Jan 2023 19:25:48 +0000 (20:25 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 28 Jun 2024 21:48:12 +0000 (23:48 +0200)
commitd49184b7b585f9da7ee546b744525f62117019f6
treed2e651f70fb21bc3b5980d20b943075f49eee022
parente793c724b48ca8cae9693bc3be528e85284c126a
can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function

This is a preparation patch.

Sending the UINC messages followed by incrementing the tail pointer
will be called in more than one place in upcoming patches, so factor
this out into a separate function.

Also make mcp251xfd_handle_rxif_ring_uinc() safe to be called with a
"len" of 0.

Tested-by: Stefan Althöfer <Stefan.Althoefer@janztec.com>
Tested-by: Thomas Kopp <thomas.kopp@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-rx.c