[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240223115155.8806-1-jirislaby@kernel.org>
Date: Fri, 23 Feb 2024 12:51:51 +0100
From: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
To: stefani@...bold.net
Cc: linux-kernel@...r.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Subject: [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(-)
--
2.43.2
Powered by blists - more mailing lists