Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: at91: main: Drop unneeded cast in at91_clk_register_main_osc()
@ 2026-08-21 12:44 Geert Uytterhoeven
  2026-08-21 13:42 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 12:44 UTC (permalink / raw)
  To: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Stephen Boyd,
	Brian Masney, Jerome Brunet
  Cc: Kees Cook, linux-clk, linux-arm-kernel, Geert Uytterhoeven

When assigning a non-const pointer to a const pointer, no cast is
needed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: at91: main: Drop unneeded cast in at91_clk_register_main_osc()
  2026-08-21 12:44 [PATCH] clk: at91: main: Drop unneeded cast in at91_clk_register_main_osc() Geert Uytterhoeven
@ 2026-08-21 13:42 ` Nicolas Ferre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2026-08-21 13:42 UTC (permalink / raw)
  To: Geert Uytterhoeven, Alexandre Belloni, Claudiu Beznea,
	Stephen Boyd, Brian Masney, Jerome Brunet
  Cc: Kees Cook, linux-clk, linux-arm-kernel

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 <geert+renesas@glider.be>

Yes, thanks Geert:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
> 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
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-21 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 12:44 [PATCH] clk: at91: main: Drop unneeded cast in at91_clk_register_main_osc() Geert Uytterhoeven
2026-08-21 13:42 ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox