[PATCH] drm/panel: himax-hx8279: Initialize goa_{even, odd}_valid in hx8279_check_goa_config()

Nathan Chancellor nathan at kernel.org
Wed Apr 23 17:29:03 UTC 2025


On Wed, Apr 23, 2025 at 04:01:20PM +0200, AngeloGioacchino Del Regno wrote:
> or the shorter form:
> 
> 	goa_odd_valid = (num_zero != ARRAY_SIZE(desc->goa_odd_timing));
> 
> 	/* Up to 3 zeroes is a valid config. Check them all. */
> 	num_zero = 1;
> 	for (i = 0; i < ARRAY_SIZE(desc->goa_even_timing); i++) {
> 		if (desc->goa_even_timing[i])
> 			num_zero++;
> 	}
> 
> 	goa_even_valid = (num_zero != ARRAY_SIZE(desc->goa_even_timing));
> 

Ah yeah, I think I like this the best as it is the most compact while
always ensuring the variable is always initialized. I will send a v2
with your Reviewed-by carried forward and an additional Suggested-by
shortly.

Cheers,
Nathan


More information about the dri-devel mailing list