[PATCH v3 2/3] clk: scmi: Fix priv initialization in scmi_clk_gate()

Marek Vasut marek.vasut at mailbox.org
Wed Dec 17 21:23:54 CET 2025


On 12/17/25 5:45 PM, Patrice Chotard wrote:

> @@ -156,6 +156,15 @@ static int scmi_clk_gate(struct clk *clk, int enable)
>   					     in_v2, out);
>   	int ret;
>   
> +	/*
> +	 * retrieve the correct priv which was set in scmi_clk_probe().

Sentence usually starts with a capital letter, i.e. Retrieve ...

> +	 * in case CLK_CCF is set, priv was set in parent_priv

Same here, also ends with full stop .

Also, please expand the comment, this terse comment is really difficult 
to understand.

> +	 */
> +	if (CONFIG_IS_ENABLED(CLK_CCF))
> +		priv = dev_get_parent_priv(clk->dev);
> +	else
> +		priv = dev_get_priv(clk->dev);
> +
>   	ret = devm_scmi_process_msg(clk->dev,
>   				    (priv->version < CLOCK_PROTOCOL_VERSION_2_1) ?
>   				    &msg_v1 : &msg_v2);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list