Commit 8ae5b280 authored by jimix@watson.ibm.com's avatar jimix@watson.ibm.com Committed by Paul Mackerras

[PATCH] powerpc: udbg_printf() formatting attribute

This patch allows the compiler to catch any printf-like mismatches for
udbg_printf().  After some brute force building I've only found issues
with my own code and lparcfg.c It could break some developers, but
IMHO that would be goodness.
Signed-off-by: default avatarJimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 35dd5432
...@@ -521,10 +521,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, ...@@ -521,10 +521,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
current_weight = (resource >> 5 * 8) & 0xFF; current_weight = (resource >> 5 * 8) & 0xFF;
pr_debug("%s: current_entitled = %lu, current_weight = %lu\n", pr_debug("%s: current_entitled = %lu, current_weight = %u\n",
__FUNCTION__, current_entitled, current_weight); __FUNCTION__, current_entitled, current_weight);
pr_debug("%s: new_entitled = %lu, new_weight = %lu\n", pr_debug("%s: new_entitled = %lu, new_weight = %u\n",
__FUNCTION__, *new_entitled_ptr, *new_weight_ptr); __FUNCTION__, *new_entitled_ptr, *new_weight_ptr);
retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,
......
...@@ -23,7 +23,8 @@ extern int udbg_write(const char *s, int n); ...@@ -23,7 +23,8 @@ extern int udbg_write(const char *s, int n);
extern int udbg_read(char *buf, int buflen); extern int udbg_read(char *buf, int buflen);
extern void register_early_udbg_console(void); extern void register_early_udbg_console(void);
extern void udbg_printf(const char *fmt, ...); extern void udbg_printf(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
extern void udbg_progress(char *s, unsigned short hex); extern void udbg_progress(char *s, unsigned short hex);
extern void udbg_init_uart(void __iomem *comport, unsigned int speed, extern void udbg_init_uart(void __iomem *comport, unsigned int speed,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment