[PATCH v3 2/2] include/linux/kfifo.h:fix errors

From: Xiaofeng Lian
Date: Sat Oct 05 2024 - 09:53:20 EST


Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202410051712.VDmFpiVZ-lkp@xxxxxxxxx/

- Fixed an error detected by the kernel test robot caused by an
incorrectly passed parameter in the INIT_KFIFO macro.

Signed-off-by: Xiaofeng Lian <1198715581lxf@xxxxxxxxx>
---
include/linux/kfifo.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 66eb1b8971f7..316b6c019550 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -148,7 +148,7 @@ struct kfifo_rec_ptr_2 __STRUCT_KFIFO_PTR(unsigned char, 2, void);
struct __kfifo *__kfifo = &__tmp->kfifo; \
__kfifo->in = 0; \
__kfifo->out = 0; \
- __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp->buf) - 1;\
+ __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : __KFIFO_SIZE(__tmp) - 1;\
__kfifo->esize = sizeof(*__tmp->buf); \
__kfifo->data = __is_kfifo_ptr(__tmp) ? NULL : __tmp->buf; \
})
--
2.45.2