Skip to contentSkip to conversation

scripts:modify output format

PATCH In review Dong Chuanjian 2 participants 3 messages May 16, 2022 – May 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts:modify output format

scripts:modify output format

---
 scripts/kallsyms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kallsyms.c +1 -1
index 8caabddf817c..ba50993785ec 100644
@@ -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%u\n", best_idx[i]);
 	printf("\n");
 }
 
Signature · 1 line
2.18.2
#1 lore raw

Hi,

The change looks good to me, but there are a few other "process" problems.

1. Was there a compiler warning that caused this patch? If so, then tell us about it.

2. This is v2 of the patch. You should describe what changed between v1 and v2 (below the first --- line).

Thanks.

Quoted 20 lines · Dong Chuanjian

scripts:modify output format

---
 scripts/kallsyms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kallsyms.c +1 -1
index 8caabddf817c..ba50993785ec 100644
@@ -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%u\n", best_idx[i]);
 	printf("\n");
 }
 
Signature · 1 line
~Randy
#2 lore raw

The compiler does not have warnings, but the definition of the output variable is "unsigned int",So there will be this patch.