linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: max31335: fix interrupt status reg
@ 2024-02-19  9:16 Antoniu Miclaus
  2024-02-21 13:30 ` Nuno Sá
  2024-02-29 21:43 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Antoniu Miclaus @ 2024-02-19  9:16 UTC (permalink / raw)
  To: Antoniu Miclaus, Alexandre Belloni, Guenter Roeck, linux-rtc,
	linux-kernel

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")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/rtc/rtc-max31335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max31335.c b/drivers/rtc/rtc-max31335.c
index 402fda8fd548..a2441e5c2c74 100644
--- a/drivers/rtc/rtc-max31335.c
+++ b/drivers/rtc/rtc-max31335.c
@@ -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 */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: max31335: fix interrupt status reg
  2024-02-19  9:16 [PATCH] rtc: max31335: fix interrupt status reg Antoniu Miclaus
@ 2024-02-21 13:30 ` Nuno Sá
  2024-02-29 21:43 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Nuno Sá @ 2024-02-21 13:30 UTC (permalink / raw)
  To: Antoniu Miclaus, Alexandre Belloni, Guenter Roeck, linux-rtc,
	linux-kernel

On Mon, 2024-02-19 at 11:16 +0200, Antoniu Miclaus wrote:
> 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")
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>

>  drivers/rtc/rtc-max31335.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-max31335.c b/drivers/rtc/rtc-max31335.c
> index 402fda8fd548..a2441e5c2c74 100644
> --- a/drivers/rtc/rtc-max31335.c
> +++ b/drivers/rtc/rtc-max31335.c
> @@ -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 */


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: max31335: fix interrupt status reg
  2024-02-19  9:16 [PATCH] rtc: max31335: fix interrupt status reg Antoniu Miclaus
  2024-02-21 13:30 ` Nuno Sá
@ 2024-02-29 21:43 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2024-02-29 21:43 UTC (permalink / raw)
  To: Guenter Roeck, linux-rtc, linux-kernel, Antoniu Miclaus

On Mon, 19 Feb 2024 11:16:15 +0200, Antoniu Miclaus wrote:
> 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,

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-29 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  9:16 [PATCH] rtc: max31335: fix interrupt status reg Antoniu Miclaus
2024-02-21 13:30 ` Nuno Sá
2024-02-29 21:43 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).