ACK: [PATCH] opal: cpu_info: reduce scope of some variables
ivanhu
ivan.hu at canonical.com
Thu Feb 2 04:52:04 UTC 2017
On 2017年01月24日 20:30, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> clean up some cppcheck style warnings by reducing scope of some
> variables.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/opal/cpu_info.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/opal/cpu_info.c b/src/opal/cpu_info.c
> index 22cccbf..603163c 100644
> --- a/src/opal/cpu_info.c
> +++ b/src/opal/cpu_info.c
> @@ -32,12 +32,13 @@ static int get_xscom_property(fwts_framework *fw,
> bool hex,
> char *property)
> {
> - int node, prop_len, failures = 0;
> - const char *prop_buf;
> + int failures = 0;
> char *prop_string = strstr(my_path, "/xscom");
>
> if (prop_string) {
> - node = fdt_path_offset(fw->fdt, prop_string);
> + const char *prop_buf;
> + int prop_len;
> + int node = fdt_path_offset(fw->fdt, prop_string);
> if (node >= 0) {
> prop_buf = fdt_getprop(fw->fdt, node,
> property,
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list