Archive-only list for patches
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: neil.armstrong@linaro.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jessica Zhang <quic_jesszhan@quicinc.com>,
	dri-devel@lists.freedesktop.org, llvm@lists.linux.dev,
	patches@lists.linux.dev
Subject: Re: [PATCH] drm/panel: himax-hx8279: Initialize goa_{even,odd}_valid in hx8279_check_goa_config()
Date: Wed, 23 Apr 2025 10:29:03 -0700	[thread overview]
Message-ID: <20250423172903.GA1472499@ax162> (raw)
In-Reply-To: <4cd274f8-85ab-43dc-bef4-41646d43b775@collabora.com>

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

      reply	other threads:[~2025-04-23 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 21:20 [PATCH] drm/panel: himax-hx8279: Initialize goa_{even,odd}_valid in hx8279_check_goa_config() Nathan Chancellor
2025-04-23 13:45 ` Neil Armstrong
2025-04-23 13:50   ` Neil Armstrong
2025-04-23 14:01     ` AngeloGioacchino Del Regno
2025-04-23 17:29       ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423172903.GA1472499@ax162 \
    --to=nathan@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=llvm@lists.linux.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=patches@lists.linux.dev \
    --cc=quic_jesszhan@quicinc.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox