Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eugen Hristev <ehristev@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 2/3] media: microchip: Make sure clk_init_data is fully initialized
Date: Thu, 27 Aug 2026 08:59:52 +0300	[thread overview]
Message-ID: <d0c69e30-de4e-4e69-9556-3fd93d011045@kernel.org> (raw)
In-Reply-To: <85c229d88f297fe32c3f2ea42d727b116bdeb998.1787240035.git.geert+renesas@glider.be>

On 8/21/26 13:04, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
>  drivers/media/platform/microchip/microchip-isc-clk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

The only nitpick I have is that "media: microchip" holds multiple
drivers, while you are fixing this for the microchip ISC.

Regardless,
Reviewed-by: Eugen Hristev <ehristev@kernel.org>
> diff --git a/drivers/media/platform/microchip/microchip-isc-clk.c b/drivers/media/platform/microchip/microchip-isc-clk.c
> index 24358d804e75d75c..65d5fb8019b341b8 100644
> --- a/drivers/media/platform/microchip/microchip-isc-clk.c
> +++ b/drivers/media/platform/microchip/microchip-isc-clk.c
> @@ -231,7 +231,7 @@ static int isc_clk_register(struct isc_device *isc, unsigned int id)
>  	struct regmap *regmap = isc->regmap;
>  	struct device_node *np = isc->dev->of_node;
>  	struct isc_clk *isc_clk;
> -	struct clk_init_data init;
> +	struct clk_init_data init = {};
>  	const char *clk_name = np->name;
>  	const char *parent_names[3];
>  	int num_parents;


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2026-08-27  6:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 10:04 [PATCH 0/3] media: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:04 ` [PATCH 1/3] media: cec: meson: ao-cec-g12a: " Geert Uytterhoeven
2026-08-21 10:04 ` [PATCH 2/3] media: microchip: " Geert Uytterhoeven
2026-08-27  5:59   ` Eugen Hristev [this message]
2026-08-21 10:04 ` [PATCH 3/3] media: samsung: exynos4-is: " Geert Uytterhoeven
2026-08-21 10:15   ` sashiko-bot
2026-08-24 15:19 ` [PATCH 0/3] media: " Brian Masney

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=d0c69e30-de4e-4e69-9556-3fd93d011045@kernel.org \
    --to=ehristev@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=hverkuil@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mchehab@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=s.nawrocki@samsung.com \
    /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