From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Andrew Morton <akpm@linux-foundation.org>,
Yury Norov <ynorov@caviumnetworks.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] linux/bitmap.h: fix type of nbits in bitmap_shift_right()
Date: Sat, 18 Aug 2018 15:16:20 +0200 [thread overview]
Message-ID: <20180818131623.8755-5-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20180818131623.8755-1-linux@rasmusvillemoes.dk>
Most other bitmap API, including the OOL version __bitmap_shift_right,
take unsigned nbits. This was accidentally left out from 2fbad29917c98.
Fixes: 2fbad29917c98 (lib: bitmap: change bitmap_shift_right to take unsigned parameters)
Reported-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
include/linux/bitmap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index a7a8b5017d62..e34c361f4a92 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -383,7 +383,7 @@ static __always_inline void bitmap_clear(unsigned long *map, unsigned int start,
}
static inline void bitmap_shift_right(unsigned long *dst, const unsigned long *src,
- unsigned int shift, int nbits)
+ unsigned int shift, unsigned int nbits)
{
if (small_const_nbits(nbits))
*dst = (*src & BITMAP_LAST_WORD_MASK(nbits)) >> shift;
--
2.16.4
next prev parent reply other threads:[~2018-08-18 13:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-18 13:16 [PATCH 0/7] assorted minor bitmap patches Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 1/7] lib/bitmap.c: remove wrong documentation Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 2/7] linux/bitmap.h: handle constant zero-size bitmaps correctly Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 3/7] linux/bitmap.h: remove redundant uses of small_const_nbits() Rasmus Villemoes
2018-08-18 13:16 ` Rasmus Villemoes [this message]
2018-08-18 13:16 ` [PATCH 5/7] linux/bitmap.h: relax comment on compile-time constant nbits Rasmus Villemoes
2018-09-04 11:08 ` Yury Norov
2018-09-04 11:30 ` Andy Shevchenko
2018-09-04 11:45 ` Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 6/7] lib/bitmap.c: fix remaining space computation in bitmap_print_to_pagebuf Rasmus Villemoes
2018-08-19 12:37 ` Andy Shevchenko
2018-08-20 7:36 ` Rasmus Villemoes
2018-08-18 13:16 ` [PATCH 7/7] lib/bitmap.c: simplify bitmap_print_to_pagebuf Rasmus Villemoes
2018-08-19 12:39 ` [PATCH 0/7] assorted minor bitmap patches Andy Shevchenko
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=20180818131623.8755-5-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ynorov@caviumnetworks.com \
/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;
as well as URLs for NNTP newsgroup(s).