+ scripts-fixed-printf-format-mismatch.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: scripts: fix printf format mismatch
has been added to the -mm tree.  Its filename is
     scripts-fixed-printf-format-mismatch.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/scripts-fixed-printf-format-mismatch.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/scripts-fixed-printf-format-mismatch.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: nixiaoming <nixiaoming@xxxxxxxxxx>
Subject: scripts: fix printf format mismatch

scripts/kallsyms.c: function write_src:
"printf", the #1 format specifier "d" need arg type "int",
but the according arg "table_cnt" has type "unsigned int"

scripts/recordmcount.c: function do_file:
"fprintf", the #1 format specifier "d" need arg type "int",
but the according arg "(*w2)(ehdr->e_machine)" has type "unsigned int"

scripts/recordmcount.h: function find_secsym_ndx:
"fprintf", the #1 format specifier "d" need arg type "int",
but the according arg "txtndx" has type "unsigned int"

Link: http://lkml.kernel.org/r/20180524031612.79723-1-nixiaoming@xxxxxxxxxx
Signed-off-by: nixiaoming <nixiaoming@xxxxxxxxxx>
Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Cc: Cao jin <caoj.fnst@xxxxxxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: James Hogan <jhogan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/kallsyms.c     |    2 +-
 scripts/recordmcount.c |    2 +-
 scripts/recordmcount.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -puN scripts/kallsyms.c~scripts-fixed-printf-format-mismatch scripts/kallsyms.c
--- a/scripts/kallsyms.c~scripts-fixed-printf-format-mismatch
+++ a/scripts/kallsyms.c
@@ -405,7 +405,7 @@ static void write_src(void)
 	}
 
 	output_label("kallsyms_num_syms");
-	printf("\tPTR\t%d\n", table_cnt);
+	printf("\tPTR\t%u\n", table_cnt);
 	printf("\n");
 
 	/* table of offset markers, that give the offset in the compressed stream
diff -puN scripts/recordmcount.c~scripts-fixed-printf-format-mismatch scripts/recordmcount.c
--- a/scripts/recordmcount.c~scripts-fixed-printf-format-mismatch
+++ a/scripts/recordmcount.c
@@ -500,7 +500,7 @@ do_file(char const *const fname)
 	gpfx = 0;
 	switch (w2(ehdr->e_machine)) {
 	default:
-		fprintf(stderr, "unrecognized e_machine %d %s\n",
+		fprintf(stderr, "unrecognized e_machine %u %s\n",
 			w2(ehdr->e_machine), fname);
 		fail_file();
 		break;
diff -puN scripts/recordmcount.h~scripts-fixed-printf-format-mismatch scripts/recordmcount.h
--- a/scripts/recordmcount.h~scripts-fixed-printf-format-mismatch
+++ a/scripts/recordmcount.h
@@ -441,7 +441,7 @@ static unsigned find_secsym_ndx(unsigned
 			return symp - sym0;
 		}
 	}
-	fprintf(stderr, "Cannot find symbol for section %d: %s.\n",
+	fprintf(stderr, "Cannot find symbol for section %u: %s.\n",
 		txtndx, txtname);
 	fail_file();
 }
_

Patches currently in -mm which might be from nixiaoming@xxxxxxxxxx are

scripts-fixed-printf-format-mismatch.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux