Skip to contentSkip to conversation

rtc: max31335: fix interrupt status reg

PATCH Applied Antoniu Miclaus 3 participants 3 messages Feb 19, 2024 – Feb 29, 2024

Subsystems (2)
lore
Share & tools
lore

Antoniu Miclaus

author maintainer
#0 lore raw

PATCH 1/1 rtc: max31335: fix interrupt status reg

Fix the register value comparison in the max31335_volatile_reg function for the interrupt status register.

MAX31335_STATUS1 macro definition corresponds to the actual interrupt status register.

Fixes dedaf03b99d6 ("rtc: max31335: add driver support")
---
 drivers/rtc/rtc-max31335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-max31335.c +1 -1
index 402fda8fd548..a2441e5c2c74 100644
@@ -204,7 +204,7 @@ static bool max31335_volatile_reg(struct device *dev, unsigned int reg)
 		return true;
 
 	/* interrupt status register */
-	if (reg == MAX31335_INT_EN1_A1IE)
+	if (reg == MAX31335_STATUS1)
 		return true;
 
 	/* temperature registers */
Signature · 1 line
2.43.0
Reviewed-by Nuno Sa on v1 1/1
#1 lore raw
Quoted 9 lines · Antoniu Miclaus

Fix the register value comparison in the max31335_volatile_reg function for the interrupt status register.

MAX31335_STATUS1 macro definition corresponds to the actual interrupt status register.

Fixes dedaf03b99d6 ("rtc: max31335: add driver support")

---

Quoted 17 lines

 drivers/rtc/rtc-max31335.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-max31335.c +0 -0
index 402fda8fd548..a2441e5c2c74 100644
@@ -204,7 +204,7 @@ static bool max31335_volatile_reg(struct device *dev, unsigned
 int reg)
  		return true;


  /* interrupt status register */

drivers/rtc/rtc-max31335.c +1 -1
-	if (reg == MAX31335_INT_EN1_A1IE)
+	if (reg == MAX31335_STATUS1)

  return true;

  /* temperature registers */

maintainer Applied
#2 lore raw
In reply to Antoniu Miclaus
Quoted 8 lines · Antoniu Miclaus

Fix the register value comparison in the max31335_volatile_reg function for the interrupt status register.

MAX31335_STATUS1 macro definition corresponds to the actual interrupt status register.

[...]

I hope you realize that this is exactly what Guenter was referring to when he said:

"It seems to be quite common for automotive chips, though, that they are held tightly under wrap, making it all but impossible to properly review their drivers. I have observed several times now that information not available to reviewers resulted in bad or buggy drivers."

Applied

[1/1] rtc: max31335: fix interrupt status reg

      https://git.kernel.org/abelloni/c/c12e67e076cb

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com