[igt-dev] [PATCH i-g-t 13/21] lib/igt_alsa: Remove dead assignment

Paul Kocialkowski paul.kocialkowski at bootlin.com
Wed Jan 16 14:14:18 UTC 2019


Hi,

On Wed, 2019-01-16 at 13:20 +0200, Petri Latvala wrote:
> The execution can only reach the end (goto complete) or the new
> unconditional assignment a few lines below before the value is read
> again. Either it's really a dead assignment, or there's a bug with the
> execution flow. Leaning on the former.

It is indeed a dead assignment and your understanding is correct!

Thanks for the fixup.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>

Cheers,

Paul

> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> Cc: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
> ---
>  lib/igt_alsa.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lib/igt_alsa.c b/lib/igt_alsa.c
> index 3ad0521a..bb6682cc 100644
> --- a/lib/igt_alsa.c
> +++ b/lib/igt_alsa.c
> @@ -523,8 +523,6 @@ int alsa_run(struct alsa *alsa, int duration_ms)
>  			reached = false;
>  
>  			if (!output_ready) {
> -				output_ready = true;
> -
>  				for (i = 0; i < alsa->output_handles_count; i++)
>  					output_counts[i] = 0;
>  
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com



More information about the igt-dev mailing list