Re: [PATCH] m68k: coldfire:Add const to clk_ops

From: Geert Uytterhoeven
Date: Mon May 30 2022 - 03:12:17 EST


Hi Xiang,

On Mon, May 30, 2022 at 4:53 AM Xiang wangx <wangxiang@xxxxxxxxxx> wrote:
> Struct clk_ops should normally be const.
>
> Signed-off-by: Xiang wangx <wangxiang@xxxxxxxxxx>

Thanks for your patch!

> --- a/arch/m68k/coldfire/clk.c
> +++ b/arch/m68k/coldfire/clk.c
> @@ -50,7 +50,7 @@ static void __clk_disable0(struct clk *clk)
> __raw_writeb(clk->slot, MCFPM_PPMSR0);
> }
>
> -struct clk_ops clk_ops0 = {
> +struct const clk_ops clk_ops0 = {

The "const" should be first on the line.
Please test-compile your patches before submitting them.

> .enable = __clk_enable0,
> .disable = __clk_disable0,
> };

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds