* [PATCH] scripts:force conversion argument type
@ 2022-05-12 2:38 Dong Chuanjian
2022-05-12 3:02 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Dong Chuanjian @ 2022-05-12 2:38 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Changbin Du, Nick Desaulniers
Cc: linux-kernel
scripts:force conversion argument type
Signed-off-by: Dong Chuanjian <chuanjian@nfschina.com>
---
scripts/kallsyms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 8caabddf817c..544ab1e1b5ca 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -498,7 +498,7 @@ static void write_src(void)
output_label("kallsyms_token_index");
for (i = 0; i < 256; i++)
- printf("\t.short\t%d\n", best_idx[i]);
+ printf("\t.short\t%d\n", (int)best_idx[i]);
printf("\n");
}
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] scripts:force conversion argument type
2022-05-12 2:38 [PATCH] scripts:force conversion argument type Dong Chuanjian
@ 2022-05-12 3:02 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2022-05-12 3:02 UTC (permalink / raw)
To: Dong Chuanjian, Masahiro Yamada, Nathan Chancellor, Changbin Du,
Nick Desaulniers
Cc: linux-kernel
On 5/11/22 19:38, Dong Chuanjian wrote:
> scripts:force conversion argument type
>
> Signed-off-by: Dong Chuanjian <chuanjian@nfschina.com>
> ---
> scripts/kallsyms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 8caabddf817c..544ab1e1b5ca 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -498,7 +498,7 @@ static void write_src(void)
>
> output_label("kallsyms_token_index");
> for (i = 0; i < 256; i++)
> - printf("\t.short\t%d\n", best_idx[i]);
> + printf("\t.short\t%d\n", (int)best_idx[i]);
Or (better) you could use %u instead of %d to print the unsigned int value.
> printf("\n");
> }
>
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-12 3:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12 2:38 [PATCH] scripts:force conversion argument type Dong Chuanjian
2022-05-12 3:02 ` Randy Dunlap
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.