All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/vnsprintf: add const modifier for param 'bitmap'
@ 2022-08-16 14:45 Guangbin Huang
  2022-08-16 22:39 ` Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guangbin Huang @ 2022-08-16 14:45 UTC (permalink / raw)
  To: pmladek, rostedt, senozhatsky, andriy.shevchenko, linux
  Cc: linux-kernel, bpf, lipeng321, shenjian15, huangguangbin2

From: Jian Shen <shenjian15@huawei.com>

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>
---
 lib/vsprintf.c | 4 ++--
 1 file 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);
-- 
2.33.0


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

* Re: [PATCH] lib/vnsprintf: add const modifier for param 'bitmap'
  2022-08-16 14:45 [PATCH] lib/vnsprintf: add const modifier for param 'bitmap' Guangbin Huang
@ 2022-08-16 22:39 ` Steven Rostedt
  2022-08-19 12:05 ` Sergey Senozhatsky
  2022-08-25  9:07 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2022-08-16 22:39 UTC (permalink / raw)
  To: Guangbin Huang
  Cc: pmladek, senozhatsky, andriy.shevchenko, linux, linux-kernel,
	bpf, lipeng321, shenjian15

On Tue, 16 Aug 2022 22:45:57 +0800
Guangbin Huang <huangguangbin2@huawei.com> wrote:

> From: Jian Shen <shenjian15@huawei.com>
> 
> There is no modification for param bitmap in function
> bitmap_string() and bitmap_list_string(), so add const
> modifier for it.

Yep, seems so.

Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

> 
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>

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

* Re: [PATCH] lib/vnsprintf: add const modifier for param 'bitmap'
  2022-08-16 14:45 [PATCH] lib/vnsprintf: add const modifier for param 'bitmap' Guangbin Huang
  2022-08-16 22:39 ` Steven Rostedt
@ 2022-08-19 12:05 ` Sergey Senozhatsky
  2022-08-25  9:07 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2022-08-19 12:05 UTC (permalink / raw)
  To: Guangbin Huang
  Cc: pmladek, rostedt, senozhatsky, andriy.shevchenko, linux,
	linux-kernel, bpf, lipeng321, shenjian15

On (22/08/16 22:45), Guangbin Huang wrote:
> 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>

FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

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

* Re: [PATCH] lib/vnsprintf: add const modifier for param 'bitmap'
  2022-08-16 14:45 [PATCH] lib/vnsprintf: add const modifier for param 'bitmap' Guangbin Huang
  2022-08-16 22:39 ` Steven Rostedt
  2022-08-19 12:05 ` Sergey Senozhatsky
@ 2022-08-25  9:07 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2022-08-25  9:07 UTC (permalink / raw)
  To: Guangbin Huang
  Cc: rostedt, senozhatsky, andriy.shevchenko, linux, linux-kernel,
	bpf, lipeng321, shenjian15

On Tue 2022-08-16 22:45:57, Guangbin Huang wrote:
> From: Jian Shen <shenjian15@huawei.com>
> 
> 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>

The patch has been committed into printk/linux.git, branch
for-6.1/trivial.

Best Regards,
Petr

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

end of thread, other threads:[~2022-08-25  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 14:45 [PATCH] lib/vnsprintf: add const modifier for param 'bitmap' Guangbin Huang
2022-08-16 22:39 ` Steven Rostedt
2022-08-19 12:05 ` Sergey Senozhatsky
2022-08-25  9:07 ` Petr Mladek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.