kfifo: drop __kfifo_dma_out_finish_r()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Fri, 5 Apr 2024 06:08:12 +0000 (08:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2024 13:28:02 +0000 (15:28 +0200)
It is the same as __kfifo_skip_r(), so:
* drop __kfifo_dma_out_finish_r() completely, and
* replace its (only) use by __kfifo_skip_r().

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-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/kfifo.h
lib/kfifo.c

index 0b35a41440ff13751277c3356b743eadb341d007..bc7a1f5bb0ce39a40c40b85b792ca5720f2fb4a9 100644 (file)
@@ -797,7 +797,7 @@ __kfifo_int_must_check_helper( \
        const size_t __recsize = sizeof(*__tmp->rectype); \
        struct __kfifo *__kfifo = &__tmp->kfifo; \
        if (__recsize) \
-               __kfifo_dma_out_finish_r(__kfifo, __recsize); \
+               __kfifo_skip_r(__kfifo, __recsize); \
        else \
                __kfifo->out += __len / sizeof(*__tmp->type); \
 })
@@ -879,8 +879,6 @@ extern void __kfifo_dma_in_finish_r(struct __kfifo *fifo,
 extern unsigned int __kfifo_dma_out_prepare_r(struct __kfifo *fifo,
        struct scatterlist *sgl, int nents, unsigned int len, size_t recsize);
 
-extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize);
-
 extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize);
 
 extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize);
index 12f5a347aa137088a5364c3dcb0919a316fd7e88..958099cc4914ba98affcd0399952f221108278d2 100644 (file)
@@ -582,11 +582,3 @@ unsigned int __kfifo_dma_out_prepare_r(struct __kfifo *fifo,
 }
 EXPORT_SYMBOL(__kfifo_dma_out_prepare_r);
 
-void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize)
-{
-       unsigned int len;
-
-       len = __kfifo_peek_n(fifo, recsize);
-       fifo->out += len + recsize;
-}
-EXPORT_SYMBOL(__kfifo_dma_out_finish_r);