On Tue, 25 Jun 2019 14:49:04 +0300
Baruch Siach <bar...@tkos.co.il> wrote:

> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 436935f88bda..b400fab17578 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1726,9 +1726,9 @@ static void pr_out_u64(struct dl *dl, const char *name, 
> uint64_t val)
>               jsonw_u64_field(dl->jw, name, val);
>       } else {
>               if (g_indent_newline)
> -                     pr_out("%s %lu", name, val);
> +                     pr_out("%s %llu", name, val);
>               else
> -                     pr_out(" %s %lu", name, val);
> +                     pr_out(" %s %llu", name, val);

But on 64 bit target %llu expects unsigned long long which is 128bit.

The better way to fix this is to use:
#include <inttypes.h>

And the use the macro PRIu64
                        pr_out(" %s %"PRIu64, name, val);

Reply via email to