[patch] udb_printf() formatting attribute

Nathan Lynch ntl at pobox.com
Thu May 18 02:00:53 EST 2006


Jimi Xenidis wrote:
> 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: Jimi Xenidis <jimix at watson.ibm.com>
> ---
> diff -r 0163968f7fce arch/powerpc/kernel/lparcfg.c
> --- a/arch/powerpc/kernel/lparcfg.c	Tue May 16 15:55:19 2006 -0400
> +++ b/arch/powerpc/kernel/lparcfg.c	Wed May 17 10:43:55 2006 -0400
> @@ -521,10 +521,10 @@ static ssize_t lparcfg_write(struct file
> 	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);
> -	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);
> 	retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr,

Does this really fix a bug?  What warnings are you able to get gcc to
emit?





More information about the Linuxppc-dev mailing list