lib/vsprintf: don't increment buf in bitmap_list_string
Subsystems (2)
PATCH 1/1 lib/vsprintf: don't increment buf in bitmap_list_string
Increment is confusing as the buf is overritten at the same line.
--- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/vsprintf.c +1 -1
@@ -1261,7 +1261,7 @@ char *bitmap_list_string(char *buf, char *end, unsigned long *bitmap,if (buf < end) *buf ='-' ; - buf =number (++buf, end, rtop -1 , default_dec_spec); + buf =number (buf +1 , end, rtop -1 , default_dec_spec); }return buf; }
Signature · 1 line
2.30.2
Andy Shevchenko
reviewerOn Tue, Aug 17, 2021 at 12:37:35PM -0700, Yury Norov wrote:
Thanks!
Quoted 3 lines
Increment is confusing as the buf is overritten at the same line.
Fixes b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817)
Fixes tag has its special format. I don't think we need it here, just to ask Andrew in comments that it needs to be folded.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Andrew Morton
maintainerQuoted 10 lines · On Wed, 18 Aug 2021 12:17:18 +0300 Andy Shevchenko…
On Tue, Aug 17, 2021 at 12:37:35PM -0700, Yury Norov wrote:
Thanks!
Quoted 3 lines
Increment is confusing as the buf is overritten at the same line.
Fixes b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817)Fixes tag has its special format. I don't think we need it here, just to ask Andrew in comments that it needs to be folded.
I'm assuming that Sergey will be handling this one?
Quoted 6 lines · Andrew Morton
Quoted 4 lines · On Wed, 18 Aug 2021 12:17:18 +0300 Andy Shevchenko…
On Tue, Aug 17, 2021 at 12:37:35PM -0700, Yury Norov wrote:
Thanks!
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Increment is confusing as the buf is overritten at the same line.
Fixes b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817)Fixes tag has its special format. I don't think we need it here, just to ask Andrew in comments that it needs to be folded.
I'm assuming that Sergey will be handling this one?
This is a fix to recent bitmap series. If you fold-in into b1c4af4d3d6b, would be also OK.
Sergey Senozhatsky
reviewerQuoted 11 lines · Yury Norov
Quoted 10 lines · Andrew Morton
Quoted 8 lines · On Wed, 18 Aug 2021 12:17:18 +0300 Andy Shevchenko…
On Tue, Aug 17, 2021 at 12:37:35PM -0700, Yury Norov wrote:
Thanks!
Quoted 3 lines
Increment is confusing as the buf is overritten at the same line.
Fixes b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Fixes tag has its special format. I don't think we need it here, just to ask Andrew in comments that it needs to be folded.
I'm assuming that Sergey will be handling this one?
This is a fix to recent bitmap series. If you fold-in into
b1c4af4d3d6b, would be also OK.
This type of patches simpler to handle when they sent as a reply to the patch they fix.