[PATCH] powerpc: add va_end()

Russell Currey ruscur at russell.cc
Thu Dec 17 23:09:31 AEDT 2015


On Thu, 2015-12-17 at 19:41 +1100, Daniel Axtens wrote:
> cppcheck picked up that there were a couple of missing va_end()
> calls in functions using va_start().
> 
> Signed-off-by: Daniel Axtens <dja at axtens.net>
Hey Daniel,

It's probably not worth a V2 but I think this could use a commit title that's a
bit more detailed.  Right now it doesn't really allude to what it fixes or what
it affects.

Reviewed-by: Russell Currey <ruscur at russell.cc>
> ---
>  arch/powerpc/kernel/prom_init.c              | 1 +
>  arch/powerpc/platforms/powermac/bootx_init.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/prom_init.c
> b/arch/powerpc/kernel/prom_init.c
> index 92dea8df6b26..da5192590c44 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -389,6 +389,7 @@ static void __init prom_printf(const char *format, ...)
>  			break;
>  		}
>  	}
> +	va_end(args);
>  }
>  
>  
> diff --git a/arch/powerpc/platforms/powermac/bootx_init.c
> b/arch/powerpc/platforms/powermac/bootx_init.c
> index 76f5013c35e5..c3c9bbb3573a 100644
> --- a/arch/powerpc/platforms/powermac/bootx_init.c
> +++ b/arch/powerpc/platforms/powermac/bootx_init.c
> @@ -84,6 +84,7 @@ static void __init bootx_printf(const char *format, ...)
>  			break;
>  		}
>  	}
> +	va_end(args);
>  }
>  #else /* CONFIG_BOOTX_TEXT */
>  static void __init bootx_printf(const char *format, ...) {}



More information about the Linuxppc-dev mailing list