* max8997 cleanup bug?
@ 2025-02-05 0:32 Dr. David Alan Gilbert
2025-02-07 8:58 ` Lee Jones
0 siblings, 1 reply; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-05 0:32 UTC (permalink / raw)
To: lee; +Cc: linux-kernel
Hi Lee,
I noticed that:
drivers/mfd/max8997-irq.c max8997_irq_exit
isn't called anywhere and was about to send a deadcode patch,
but I'm thinking it's actually a bug and it should be called.
Looking at the max8998, it has basically the same function,
and it calls it from an error path in it's max8998_i2c_probe.
There's no equivalent call in max8997's probe.
To me it looks like it probably goes after the 'err_i2c_haptic:'
label, but I don't know the code and as far as I know I don't
have one of the devices.
Any thoughts?
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: max8997 cleanup bug?
2025-02-05 0:32 max8997 cleanup bug? Dr. David Alan Gilbert
@ 2025-02-07 8:58 ` Lee Jones
2025-02-07 15:41 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2025-02-07 8:58 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: linux-kernel
On Wed, 05 Feb 2025, Dr. David Alan Gilbert wrote:
> Hi Lee,
> I noticed that:
> drivers/mfd/max8997-irq.c max8997_irq_exit
> isn't called anywhere and was about to send a deadcode patch,
> but I'm thinking it's actually a bug and it should be called.
>
> Looking at the max8998, it has basically the same function,
> and it calls it from an error path in it's max8998_i2c_probe.
> There's no equivalent call in max8997's probe.
>
> To me it looks like it probably goes after the 'err_i2c_haptic:'
> label, but I don't know the code and as far as I know I don't
> have one of the devices.
>
> Any thoughts?
I would convert to devm_request_threaded_irq() and remove it.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: max8997 cleanup bug?
2025-02-07 8:58 ` Lee Jones
@ 2025-02-07 15:41 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-07 15:41 UTC (permalink / raw)
To: Lee Jones; +Cc: linux-kernel
* Lee Jones (lee@kernel.org) wrote:
> On Wed, 05 Feb 2025, Dr. David Alan Gilbert wrote:
>
> > Hi Lee,
> > I noticed that:
> > drivers/mfd/max8997-irq.c max8997_irq_exit
> > isn't called anywhere and was about to send a deadcode patch,
> > but I'm thinking it's actually a bug and it should be called.
> >
> > Looking at the max8998, it has basically the same function,
> > and it calls it from an error path in it's max8998_i2c_probe.
> > There's no equivalent call in max8997's probe.
> >
> > To me it looks like it probably goes after the 'err_i2c_haptic:'
> > label, but I don't know the code and as far as I know I don't
> > have one of the devices.
> >
> > Any thoughts?
>
> I would convert to devm_request_threaded_irq() and remove it.
OK, however I don't have one of the devices, so couldn't test
it if I tried a big rework like that.
So I'd probably leave it personally.
Dave
> --
> Lee Jones [李琼斯]
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-07 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 0:32 max8997 cleanup bug? Dr. David Alan Gilbert
2025-02-07 8:58 ` Lee Jones
2025-02-07 15:41 ` Dr. David Alan Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox