ACK: [PATCH] devicetree: dt_sysinfo: reduce scope of variables 'model_buf' and 'compat_buf'

ivanhu ivan.hu at canonical.com
Thu Aug 18 02:21:11 UTC 2016



On 2016年08月17日 18:10, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Minor change to fix cppcheck style warnings, no functional chang
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/devicetree/dt_sysinfo/dt_sysinfo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> index 743feb0..f9fc851 100644
> --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c
> +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> @@ -213,7 +213,6 @@ static bool machine_matches_reference_model(fwts_framework *fw,
>  static int dt_sysinfo_check_ref_plat_compatible(fwts_framework *fw)
>  {
>  	int node, compat_len, model_len;
> -	const char *model_buf, *compat_buf;
>
>  	node = fdt_path_offset(fw->fdt, "/");
>  	if (node < 0) {
> @@ -228,6 +227,8 @@ static int dt_sysinfo_check_ref_plat_compatible(fwts_framework *fw)
>  			"root of the device tree", "ibm,powernv");
>  		return FWTS_ERROR;
>  	} else {
> +		const char *model_buf, *compat_buf;
> +
>  		compat_buf = fdt_getprop(fw->fdt, node,
>  				"compatible", &compat_len);
>  		model_buf = fdt_getprop(fw->fdt, node,
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list