ACK: [PATCH] acpi: tcpa: remove redundant initialization of boolean passed

Alex Hung alex.hung at canonical.com
Mon Jun 10 20:31:04 UTC 2019


On 2019-06-10 4:59 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The variable passed is being initialized however that value is never
> read because it is being re-assigned on various code paths that
> follow it.  Hence the initialization is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/tcpa/tcpa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/tcpa/tcpa.c b/src/acpi/tcpa/tcpa.c
> index 39ba6f7b..b662a854 100644
> --- a/src/acpi/tcpa/tcpa.c
> +++ b/src/acpi/tcpa/tcpa.c
> @@ -171,7 +171,7 @@ static int tcpa_server_test(fwts_framework *fw, fwts_acpi_table_tcpa *tcpa)
>  static int tcpa_test1(fwts_framework *fw)
>  {
>  	fwts_acpi_table_tcpa *tcpa = (fwts_acpi_table_tcpa*)table->data;
> -	bool passed = true;
> +	bool passed;
>  
>  	switch (tcpa->platform_class) {
>  	case 0:
> 


Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list