mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kfifo: make '__n' local variables *unsigned int*
@ 2022-02-26 20:53 Sergey Shtylyov
  0 siblings, 0 replies; only message in thread
From: Sergey Shtylyov @ 2022-02-26 20:53 UTC (permalink / raw)
  To: Stefani Seibold, linux-kernel

The '__n' local variables in kfifo_{in|out|out_peek}() are declared as
*unsigned long* for some strange reason -- the underlying __kfifo_*()
functions take *unsigned int* for the corresponding 'len' parameters.
Fix those declarations to *unsigned int*...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>

---
This patch is against Linus Torvalds' 'linux.git' repo.

 include/linux/kfifo.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: usb/include/linux/kfifo.h
===================================================================
--- usb.orig/include/linux/kfifo.h
+++ usb/include/linux/kfifo.h
@@ -520,7 +520,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr_const) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ?\
@@ -589,7 +589,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ?\
@@ -819,7 +819,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ? \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-26 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 20:53 [PATCH] kfifo: make '__n' local variables *unsigned int* Sergey Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®