Skip to contentSkip to conversation

thermal: imx8mm_thermal: use GENMASK() when appropriate

PATCH Applied Marcus Folkesson 3 participants 3 messages Oct 14, 2022 – Dec 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: imx8mm_thermal: use GENMASK() when appropriate

GENMASK() is preferred to use for bitmasks.

---
 drivers/thermal/imx8mm_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/imx8mm_thermal.c +2 -2
index c5cd873c6e01..74fc34b88bb0 100644
@@ -23,8 +23,8 @@
 
 #define TER_ADC_PD		BIT(30)
 #define TER_EN			BIT(31)
-#define TRITSR_TEMP0_VAL_MASK	0xff
-#define TRITSR_TEMP1_VAL_MASK	0xff0000
+#define TRITSR_TEMP0_VAL_MASK	GENMASK(7, 0)
+#define TRITSR_TEMP1_VAL_MASK	GENMASK(23, 16)
 
 #define PROBE_SEL_ALL		GENMASK(31, 30)
 
Signature · 1 line
2.37.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Marcus Folkesson

GENMASK() is preferred to use for bitmasks.

---
  drivers/thermal/imx8mm_thermal.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/imx8mm_thermal.c +0 -0
index c5cd873c6e01..74fc34b88bb0 100644

drivers/thermal/imx8mm_thermal.c line 30

Quoted 10 lines
drivers/thermal/imx8mm_thermal.c +2 -2
@@ -23,8 +23,8 @@
 
  #define TER_ADC_PD		BIT(30)
  #define TER_EN			BIT(31)
-#define TRITSR_TEMP0_VAL_MASK	0xff
-#define TRITSR_TEMP1_VAL_MASK	0xff0000
+#define TRITSR_TEMP0_VAL_MASK	GENMASK(7, 0)
+#define TRITSR_TEMP1_VAL_MASK	GENMASK(23, 16)
 
  #define PROBE_SEL_ALL		GENMASK(31, 30)
 
#2 lore raw

[thermal: thermal/next] thermal/drivers/imx8mm_thermal: Use GENMASK() when appropriate

In reply to Marcus Folkesson
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     1043376c94ebc57ddb4c2ce5be2bb41dcb8459b2
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//1043376c94ebc57ddb4c2ce5be2bb41dcb8459b2
Author:        Marcus Folkesson <[email protected]>
AuthorDate:    Fri, 14 Oct 2022 10:16:20 +02:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Thu, 08 Dec 2022 14:30:43 +01:00

thermal/drivers/imx8mm_thermal: Use GENMASK() when appropriate

GENMASK() is preferred to use for bitmasks.

---
 drivers/thermal/imx8mm_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/imx8mm_thermal.c +2 -2
index e2c2673..68608d8 100644
@@ -23,8 +23,8 @@
 
 #define TER_ADC_PD		BIT(30)
 #define TER_EN			BIT(31)
-#define TRITSR_TEMP0_VAL_MASK	0xff
-#define TRITSR_TEMP1_VAL_MASK	0xff0000
+#define TRITSR_TEMP0_VAL_MASK	GENMASK(7, 0)
+#define TRITSR_TEMP1_VAL_MASK	GENMASK(23, 16)
 
 #define PROBE_SEL_ALL		GENMASK(31, 30)