ACK: [PATCH] opal: cpu_info: remove redundant initialization of prop_string to NULL

ivanhu ivan.hu at canonical.com
Thu Feb 2 04:50:49 UTC 2017



On 2017年01月24日 20:29, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> prop_string is initialized to NULL and then re-assigned immediately
> afterwards.  Remove the redundant initialization.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/opal/cpu_info.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/opal/cpu_info.c b/src/opal/cpu_info.c
> index 1d5ec3c..22cccbf 100644
> --- a/src/opal/cpu_info.c
> +++ b/src/opal/cpu_info.c
> @@ -34,9 +34,8 @@ static int get_xscom_property(fwts_framework *fw,
>  {
>  	int node, prop_len, failures = 0;
>  	const char *prop_buf;
> -	char *prop_string = NULL;
> +	char *prop_string = strstr(my_path, "/xscom");
>
> -	prop_string = strstr(my_path, "/xscom");
>  	if (prop_string) {
>  		node = fdt_path_offset(fw->fdt, prop_string);
>  		if (node >= 0) {
>

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



More information about the fwts-devel mailing list