diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2012-09-28 23:14:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-02 23:20:34 -0400 |
commit | 5da444aae54f64575a60f1d596ed7706e3089fb0 (patch) | |
tree | 50eb6a60a9c56fc2eaa10d06eb62d28f105058bb /arch/sparc/include | |
parent | 97da37b35fc56ed7b2b1583208be0d1327ddcf30 (diff) |
sparc: fix format string argument for prom_printf()
prom_printf() takes printf style arguments. Specifing GCC's format
attribute reveals that there are several wrong usages of prom_printf().
This fixes those wrong format strings and arguments, and also leaves
format attributes in order to detect similar mistakes at compile time.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/oplib_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_64.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 27517879a6c2..c72f3045820c 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h | |||
@@ -94,7 +94,7 @@ extern int prom_getprev(void); | |||
94 | extern void prom_console_write_buf(const char *buf, int len); | 94 | extern void prom_console_write_buf(const char *buf, int len); |
95 | 95 | ||
96 | /* Prom's internal routines, don't use in kernel/boot code. */ | 96 | /* Prom's internal routines, don't use in kernel/boot code. */ |
97 | extern void prom_printf(const char *fmt, ...); | 97 | extern __printf(1, 2) void prom_printf(const char *fmt, ...); |
98 | extern void prom_write(const char *buf, unsigned int len); | 98 | extern void prom_write(const char *buf, unsigned int len); |
99 | 99 | ||
100 | /* Multiprocessor operations... */ | 100 | /* Multiprocessor operations... */ |
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 97a90475c314..a12dbe3b7762 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h | |||
@@ -98,7 +98,7 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); | |||
98 | extern void prom_console_write_buf(const char *buf, int len); | 98 | extern void prom_console_write_buf(const char *buf, int len); |
99 | 99 | ||
100 | /* Prom's internal routines, don't use in kernel/boot code. */ | 100 | /* Prom's internal routines, don't use in kernel/boot code. */ |
101 | extern void prom_printf(const char *fmt, ...); | 101 | extern __printf(1, 2) void prom_printf(const char *fmt, ...); |
102 | extern void prom_write(const char *buf, unsigned int len); | 102 | extern void prom_write(const char *buf, unsigned int len); |
103 | 103 | ||
104 | /* Multiprocessor operations... */ | 104 | /* Multiprocessor operations... */ |