mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Stefani Seibold <stefani@seibold.net>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] kfifo: make '__n' local variables *unsigned int*
Date: Sat, 26 Feb 2022 23:53:35 +0300	[thread overview]
Message-ID: <a135a18c-b332-33aa-9d79-da3395502e3f@omp.ru> (raw)

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) ? \

                 reply	other threads:[~2022-02-26 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a135a18c-b332-33aa-9d79-da3395502e3f@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefani@seibold.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®