Re: [PATCH v2 02/11] lib/vsprintf: make default_dec_spec global

From: Rasmus Villemoes
Date: Mon Jan 18 2016 - 15:38:35 EST


On Thu, Jan 14 2016, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> There are places where default specification to print decimal numbers is used.
> Make it global and convert existing users.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> lib/test_printf.c | 5 +++--
> lib/vsprintf.c | 21 +++++++++------------
> 2 files changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/lib/test_printf.c b/lib/test_printf.c
> index 4f6ae60..fd985f6 100644
> --- a/lib/test_printf.c
> +++ b/lib/test_printf.c
> @@ -376,9 +376,10 @@ large_bitmap(void)
> if (!bits)
> return;
>
> - bitmap_set(bits, 1, 20);
> + bitmap_set(bits, 0, 1);
> + bitmap_set(bits, 2, 20);
> bitmap_set(bits, 60000, 15);
> - test("1-20,60000-60014", "%*pbl", nbits, bits);
> + test("0,2-21,60000-60014", "%*pbl", nbits, bits);
> kfree(bits);
> }

What does this have to do with what the commit message claims this patch
is about? (I don't mind the rest of the patch, just curious why this is
included.)

Rasmus