diff mbox series

[1/2] thermal: rcar_gen3: Use lowercase hex constants

Message ID 20241116172934.1829676-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New
Delegated to: Daniel Lezcano
Headers show
Series thermal: rcar_gen3: Improve reading calibration fuses | expand

Commit Message

Niklas Söderlund Nov. 16, 2024, 5:29 p.m. UTC
The style of the driver is to use lowercase hex constants, correct the
few outlines.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/thermal/renesas/rcar_gen3_thermal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Geert Uytterhoeven Nov. 18, 2024, 10:30 a.m. UTC | #1
Hi Niklas,

On Sat, Nov 16, 2024 at 6:30 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> The style of the driver is to use lowercase hex constants, correct the
> few outlines.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Thanks for your patch!

> --- a/drivers/thermal/renesas/rcar_gen3_thermal.c
> +++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
> @@ -57,11 +57,11 @@
>  /* THSCP bits */
>  #define THSCP_COR_PARA_VLD     (BIT(15) | BIT(14))
>
> -#define CTEMP_MASK     0xFFF
> +#define CTEMP_MASK     0xfff
>
>  #define MCELSIUS(temp) ((temp) * 1000)
> -#define GEN3_FUSE_MASK 0xFFF
> -#define GEN4_FUSE_MASK 0xFFF
> +#define GEN3_FUSE_MASK 0xfff
> +#define GEN4_FUSE_MASK 0xfff
>
>  #define TSC_MAX_NUM    5

LGTM, but you missed a few:

$ git grep "\<0x.*[A-Z]" -- drivers/thermal/renesas/rcar_gen3_thermal.c
drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN3_IRQCTL
         0x0C
drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN3_IRQTEMP3   0x1C
drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON15  0x1BC
drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON16  0x1C0
drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON17  0x1C4

Gr{oetje,eeting}s,

                        Geert
Niklas Söderlund Nov. 19, 2024, 8:30 p.m. UTC | #2
Hi Geert,

On 2024-11-18 11:30:17 +0100, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> On Sat, Nov 16, 2024 at 6:30 PM Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > The style of the driver is to use lowercase hex constants, correct the
> > few outlines.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> 
> Thanks for your patch!
> 
> > --- a/drivers/thermal/renesas/rcar_gen3_thermal.c
> > +++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
> > @@ -57,11 +57,11 @@
> >  /* THSCP bits */
> >  #define THSCP_COR_PARA_VLD     (BIT(15) | BIT(14))
> >
> > -#define CTEMP_MASK     0xFFF
> > +#define CTEMP_MASK     0xfff
> >
> >  #define MCELSIUS(temp) ((temp) * 1000)
> > -#define GEN3_FUSE_MASK 0xFFF
> > -#define GEN4_FUSE_MASK 0xFFF
> > +#define GEN3_FUSE_MASK 0xfff
> > +#define GEN4_FUSE_MASK 0xfff
> >
> >  #define TSC_MAX_NUM    5
> 
> LGTM, but you missed a few:
> 
> $ git grep "\<0x.*[A-Z]" -- drivers/thermal/renesas/rcar_gen3_thermal.c
> drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN3_IRQCTL
>          0x0C
> drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN3_IRQTEMP3   0x1C
> drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON15  0x1BC
> drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON16  0x1C0
> drivers/thermal/renesas/rcar_gen3_thermal.c:#define REG_GEN4_THSFMON17  0x1C4

d00h, I just checked manually for things around the fuses, will fix.

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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
diff mbox series

Patch

diff --git a/drivers/thermal/renesas/rcar_gen3_thermal.c b/drivers/thermal/renesas/rcar_gen3_thermal.c
index 810f86677461..35b8ecb8877e 100644
--- a/drivers/thermal/renesas/rcar_gen3_thermal.c
+++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
@@ -57,11 +57,11 @@ 
 /* THSCP bits */
 #define THSCP_COR_PARA_VLD	(BIT(15) | BIT(14))
 
-#define CTEMP_MASK	0xFFF
+#define CTEMP_MASK	0xfff
 
 #define MCELSIUS(temp)	((temp) * 1000)
-#define GEN3_FUSE_MASK	0xFFF
-#define GEN4_FUSE_MASK	0xFFF
+#define GEN3_FUSE_MASK	0xfff
+#define GEN4_FUSE_MASK	0xfff
 
 #define TSC_MAX_NUM	5