Home
last modified time | relevance | path

Searched hist:"76738194 be605c9fb279f87d8a6b0b95904bfb60" (Results 1 – 1 of 1) sorted by relevance

/linux/include/linux/
H A Dkfifo.hdiff 76738194be605c9fb279f87d8a6b0b95904bfb60 Fri Apr 05 08:08:13 CEST 2024 Jiri Slaby (SUSE) <jirislaby@kernel.org> kfifo: introduce and use kfifo_skip_count()

kfifo_skip_count() is an extended version of kfifo_skip(), accepting
also count. This will be useful in the serial code later.

Now, it can be used to implement both kfifo_skip() and
kfifo_dma_out_finish(). In the latter, 'len' only needs to be divided by
'type' size (as it was until now).

And stop using statement expressions when the return value is cast to
'void'. Use classic 'do {} while (0)' instead.

Note: perhaps we should skip 'count' records for the 'recsize' case, but
the original (kfifo_dma_out_finish()) used to skip only one record. So
this is kept unchanged and 'count' is still ignored in the recsize case.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20240405060826.2521-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>