Skip to content

kfifo: small cleanup + linear and skip helpers

Jiri Slaby (SUSE) lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4kfifo: drop __kfifo_dma_out_finish_r()include/linux/kfifo.h lib/kfifo.c+1 -111 reply
2/4kfifo: introduce and use kfifo_skip_count()include/linux/kfifo.h+14 -150 replies
3/4kfifo: add kfifo_out_linear{,_ptr}()include/linux/kfifo.h lib/kfifo.c+92 -02 replies
4/4kfifo: fix typos in kernel-docinclude/linux/kfifo.h+5 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] kfifo: small cleanup + linear and skip helpers

Hi,

this is a small cleanup of kfifo.

More importantly, it introduces three helpers: kfifo_skip_count(), kfifo_out_linear() and kfifo_out_linear_ptr(). They allow using kfifo in the serial layer.

They are needed as up to now, there is no way to "peek" the data without actually copying to a temporary buffer. kfifo_out_linear*() allow that and kfifo_skip_count() then allows for tail moving after the copy is done. Note the copy is usually performed directly to hardware e.g. via outb(), hence the need for peek without copying anywhere.

Jiri Slaby (SUSE) (4):
kfifo: drop __kfifo_dma_out_finish_r()
kfifo: introduce and use kfifo_skip_count()
kfifo: add kfifo_out_linear{,_ptr}()
kfifo: fix typos in kernel-doc

 include/linux/kfifo.h | 105 +++++++++++++++++++++++++++++++++---------
 lib/kfifo.c           |  36 +++++++++++----
 2 files changed, 111 insertions(+), 30 deletions(-)
Signature · 1 line
2.43.2