[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210727094441.9815-1-andrea.merello@gmail.com>
Date: Tue, 27 Jul 2021 11:44:41 +0200
From: Andrea Merello <andrea.merello@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
linux-kernel@...r.kernel.org
Cc: Yury Norov <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Andrea Merello <andrea.merello@...il.com>,
Andrea Merello <andrea.merello@....it>
Subject: [PATCH v1 1/1] bitmap.h: add const modifier to bitmap_next_[set/clear]_region() argument
Those two functions don't modify the bitmap, so their bitmap argument
should be const. This patch add this.
Signed-off-by: Andrea Merello <andrea.merello@....it>
---
include/linux/bitmap.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index a36cfcec4e77..ea4a8f1a2545 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -458,7 +458,7 @@ static inline void bitmap_replace(unsigned long *dst,
__bitmap_replace(dst, old, new, mask, nbits);
}
-static inline void bitmap_next_clear_region(unsigned long *bitmap,
+static inline void bitmap_next_clear_region(const unsigned long *bitmap,
unsigned int *rs, unsigned int *re,
unsigned int end)
{
@@ -466,7 +466,7 @@ static inline void bitmap_next_clear_region(unsigned long *bitmap,
*re = find_next_bit(bitmap, end, *rs + 1);
}
-static inline void bitmap_next_set_region(unsigned long *bitmap,
+static inline void bitmap_next_set_region(const unsigned long *bitmap,
unsigned int *rs, unsigned int *re,
unsigned int end)
{
--
2.17.1
Powered by blists - more mailing lists