From: Claudiu Beznea <[email protected]>
flag and mux_flags are intended to keep bit masks. Use u32 type for it.
Signed-off-by: Claudiu Beznea <[email protected]>
---
drivers/clk/renesas/rzg2l-cpg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/renesas/rzg2l-cpg.h b/drivers/clk/renesas/rzg2l-cpg.h
index 6cee9e56acc7..0b28870a6f9d 100644
--- a/drivers/clk/renesas/rzg2l-cpg.h
+++ b/drivers/clk/renesas/rzg2l-cpg.h
@@ -92,8 +92,8 @@ struct cpg_core_clk {
unsigned int conf;
const struct clk_div_table *dtable;
const char * const *parent_names;
- int flag;
- int mux_flags;
+ u32 flag;
+ u32 mux_flags;
int num_parents;
};
--
2.39.2
Hi Claudiu,
On Tue, Sep 12, 2023 at 6:52 AM Claudiu <[email protected]> wrote:
> From: Claudiu Beznea <[email protected]>
>
> flag and mux_flags are intended to keep bit masks. Use u32 type for it.
>
> Signed-off-by: Claudiu Beznea <[email protected]>
Thanks for your patch!
> --- a/drivers/clk/renesas/rzg2l-cpg.h
> +++ b/drivers/clk/renesas/rzg2l-cpg.h
> @@ -92,8 +92,8 @@ struct cpg_core_clk {
> unsigned int conf;
> const struct clk_div_table *dtable;
> const char * const *parent_names;
> - int flag;
> - int mux_flags;
> + u32 flag;
"flag" is used for several purposes, which expected different types:
- clk_init_data.flags is unsigned long,
- The clk_divider_flags parameter of clk_hw_register_divider_table() is u8,
- The clk_divider_flags parameter of __clk_hw_register_divider() is u8,
- The flags parameter of __devm_clk_hw_register_mux() is unsigned long.
> + u32 mux_flags;
Actually the clk_mux_flags parameter of __devm_clk_hw_register_mux() is u8.
> int num_parents;
> };
I guess u32 is fine for all.
Reviewed-by: Geert Uytterhoeven <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
On Thu, Sep 14, 2023 at 3:29 PM Geert Uytterhoeven <[email protected]> wrote:
> On Tue, Sep 12, 2023 at 6:52 AM Claudiu <[email protected]> wrote:
> > From: Claudiu Beznea <[email protected]>
> >
> > flag and mux_flags are intended to keep bit masks. Use u32 type for it.
> >
> > Signed-off-by: Claudiu Beznea <[email protected]>
>
> Thanks for your patch!
>
> > --- a/drivers/clk/renesas/rzg2l-cpg.h
> > +++ b/drivers/clk/renesas/rzg2l-cpg.h
> > @@ -92,8 +92,8 @@ struct cpg_core_clk {
> > unsigned int conf;
> > const struct clk_div_table *dtable;
> > const char * const *parent_names;
> > - int flag;
> > - int mux_flags;
> > + u32 flag;
>
> "flag" is used for several purposes, which expected different types:
> - clk_init_data.flags is unsigned long,
> - The clk_divider_flags parameter of clk_hw_register_divider_table() is u8,
> - The clk_divider_flags parameter of __clk_hw_register_divider() is u8,
> - The flags parameter of __devm_clk_hw_register_mux() is unsigned long.
>
> > + u32 mux_flags;
>
> Actually the clk_mux_flags parameter of __devm_clk_hw_register_mux() is u8.
>
> > int num_parents;
> > };
>
> I guess u32 is fine for all.
> Reviewed-by: Geert Uytterhoeven <[email protected]>
Thx, will queue in renesas-clk-for-v6.7.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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