linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] bitmap.h: add const modifier to bitmap_next_[set/clear]_region() argument
@ 2021-07-27  9:44 Andrea Merello
  2021-07-27 11:48 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Merello @ 2021-07-27  9:44 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, linux-kernel
  Cc: Yury Norov, Rasmus Villemoes, Andrea Merello, Andrea Merello

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@iit.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-28 13:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  9:44 [PATCH v1 1/1] bitmap.h: add const modifier to bitmap_next_[set/clear]_region() argument Andrea Merello
2021-07-27 11:48 ` Andy Shevchenko
2021-07-27 15:26   ` Yury Norov
2021-07-28  6:39     ` Andrea Merello
2021-07-28  9:18       ` Andy Shevchenko
2021-07-28 13:46       ` Yury Norov

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).