summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorJian Shen <shenjian15@huawei.com>2022-08-16 17:45:57 +0300
committerPetr Mladek <pmladek@suse.com>2022-08-25 11:09:03 +0300
commitdc453dd89daacdc0da6d66234aa27e417df7edcd (patch)
tree0bd133c31d0ed55bc7dfa0582bbd42b3baeed02b /lib/vsprintf.c
parenta1b02751d6ec21ec1b9c7c6826fc896ffde1c33d (diff)
downloadlinux-dc453dd89daacdc0da6d66234aa27e417df7edcd.tar.xz
lib/vnsprintf: add const modifier for param 'bitmap'
There is no modification for param bitmap in function bitmap_string() and bitmap_list_string(), so add const modifier for it. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20220816144557.30779-1-huangguangbin2@huawei.com
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 3c1853a9d1c0..07b36d8b29c3 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1189,7 +1189,7 @@ char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
}
static noinline_for_stack
-char *bitmap_string(char *buf, char *end, unsigned long *bitmap,
+char *bitmap_string(char *buf, char *end, const unsigned long *bitmap,
struct printf_spec spec, const char *fmt)
{
const int CHUNKSZ = 32;
@@ -1233,7 +1233,7 @@ char *bitmap_string(char *buf, char *end, unsigned long *bitmap,
}
static noinline_for_stack
-char *bitmap_list_string(char *buf, char *end, unsigned long *bitmap,
+char *bitmap_list_string(char *buf, char *end, const unsigned long *bitmap,
struct printf_spec spec, const char *fmt)
{
int nr_bits = max_t(int, spec.field_width, 0);