ACK: [PATCH] devicetree: dt_sysinfo: reduce scope of version_buf

ivanhu ivan.hu at canonical.com
Thu Feb 2 04:44:05 UTC 2017



On 2017年01月24日 20:18, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> minor code style change, no functional difference
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/devicetree/dt_sysinfo/dt_sysinfo.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> index 9c22351..dd160ee 100644
> --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c
> +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> @@ -57,11 +57,10 @@ static int dt_sysinfo_get_version(fwts_framework *fw,
>  				char *firmware)
>  {
>  	int version_len;
> -	const char *version_buf;
>
>  	/* only output if the platform_firmware node is present */
>  	if (node >= 0) {
> -                version_buf = fdt_getprop(fw->fdt, node,
> +                const char *version_buf = fdt_getprop(fw->fdt, node,
>                          firmware, &version_len);
>                  if (version_buf) {
>                          fwts_passed(fw,
> @@ -91,7 +90,6 @@ static int dt_sysinfo_check_version(fwts_framework *fw)
>  	}
>
>  	int node, version_len;
> -	const char *version_buf;
>
>  	fwts_log_info(fw,
>  		"OPAL base device tree path is %s.",
> @@ -99,7 +97,7 @@ static int dt_sysinfo_check_version(fwts_framework *fw)
>  	node = fdt_path_offset(fw->fdt,
>  			opal_firmware);
>  	if (node >= 0) {
> -		version_buf = fdt_getprop(fw->fdt, node,
> +		const char *version_buf = fdt_getprop(fw->fdt, node,
>  			"version", &version_len);
>  		if (version_buf) {
>  			fwts_passed(fw,
>

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



More information about the fwts-devel mailing list