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
This commit is contained in:
parent
a1b02751d6
commit
dc453dd89d
@ -1189,7 +1189,7 @@ char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static noinline_for_stack
|
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)
|
struct printf_spec spec, const char *fmt)
|
||||||
{
|
{
|
||||||
const int CHUNKSZ = 32;
|
const int CHUNKSZ = 32;
|
||||||
@ -1233,7 +1233,7 @@ char *bitmap_string(char *buf, char *end, unsigned long *bitmap,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static noinline_for_stack
|
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)
|
struct printf_spec spec, const char *fmt)
|
||||||
{
|
{
|
||||||
int nr_bits = max_t(int, spec.field_width, 0);
|
int nr_bits = max_t(int, spec.field_width, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user