Re: [PATCH] clk: at91: main: Drop unneeded cast in at91_clk_register_main_osc()

Nicolas Ferre <[email protected]>
Newsgroups org.kernel.vger.linux-clk,org.infradead.lists.linux-arm-kernel
Organization microchip
Message-ID <[email protected]>
On 21/08/2026 at 14:44, Geert Uytterhoeven wrote:
> When assigning a non-const pointer to a const pointer, no cast is
> needed.
> 
> Signed-off-by: Geert Uytterhoeven <[email protected]>

Yes, thanks Geert:
Acked-by: Nicolas Ferre <[email protected]>

> ---
> No changes in generated code.
> ---
>   drivers/clk/at91/clk-main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
> index 6074ed2a16cede94..77f905e57e1ab4de 100644
> --- a/drivers/clk/at91/clk-main.c
> +++ b/drivers/clk/at91/clk-main.c
> @@ -170,7 +170,7 @@ at91_clk_register_main_osc(struct regmap *regmap,
>          init.name = name;
>          init.ops = &main_osc_ops;
>          if (parent_data)
> -               init.parent_data = (const struct clk_parent_data *)parent_data;
> +               init.parent_data = parent_data;
>          else
>                  init.parent_names = &parent_name;
>          init.num_parents = 1;
> --
> 2.43.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.