[PATCH 00/18] a few rtc driver cleanups
André Draszik
andre.draszik at linaro.org
Mon Mar 3 19:45:47 AEDT 2025
Hi Alexandre,
On Sat, 2025-03-01 at 21:36 +0100, Alexandre Belloni wrote:
> On 28/02/2025 14:07:13+0000, André Draszik wrote:
> > Hi,
> >
> > While looking at RTC, I noticed that various drivers are keeping
> > pointers to data that they're not using themselves throughout their
> > lifetime.
> >
> > So I took the liberty to drop these pointers and this series is the
> > result.
> >
> > The last two patches also convert two drivers to using dev_err_probe(),
> > as I looked slightly closer into those two. They don't exactly fit the
> > general subject of removal of unneeded pointers, but I wanted to share
> > them anyway, since they're ready.
> >
> > All of this was compile-tested only.
> >
> > Cheers,
> > Andre'
> >
> > Signed-off-by: André Draszik <andre.draszik at linaro.org>
> > ---
> > André Draszik (18):
> > rtc: max77686: drop needless struct max77686_rtc_info::rtc member
> > rtc: s5m: drop needless struct s5m_rtc_info::i2c member
> > rtc: aspeed: drop needless struct aspeed_rtc::rtc_dev member
> > rtc: ds2404: drop needless struct ds2404::rtc member
> > rtc: ep93xx: drop needless struct ep93xx_rtc::rtc member
> > rtc: ftrtc010: drop needless struct ftrtc010_rtc::rtc_dev member
> > rtc: m48t86: drop needless struct m48t86_rtc_info::rtc member
> > rtc: meson: drop needless struct meson_rtc::rtc member
> > rtc: meson-vrtc: drop needless struct meson_vrtc_data::rtc member
> > rtc: pl030: drop needless struct pl030_rtc::rtc member
> > rtc: rx8581: drop needless struct rx8581::rtc member
> > rtc: s35390a: drop needless struct s35390a::rtc member
> > rtc: sd2405al: drop needless struct sd2405al::rtc member
> > rtc: sd3078: drop needless struct sd3078::rtc member
>
> My main concern with this is that as soon as we introduce irq support,
> we are going to need the rtc pointer back in the struct. But I guess
> that most of them are old enough to say that nobody is interested in irq
> support.
Thanks for your thoughts Alexandre - I don't know the history of
these drivers and don't mind either way. I can drop those patches
that would require reintroducing if irq support is added in the
future. I think overall you're OK with keeping them, but please
let me know if I'm misunderstanding :-)
>
> > rtc: rx8581: drop needless struct rx8581
> > rtc: sd3078: drop needless struct sd3078
>
> I guess you could squash those two with the previous ones touching the
> respective drivers because you are the one removing the last remaining
> struct member.
Will do.
Cheers,
Andre'
More information about the Linux-aspeed
mailing list