From: Guenter Roeck <linux@roeck-us.net>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: sashiko-reviews@lists.linux.dev, Eric Liu <liuer@nvidia.com>,
linux-rtc@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] rtc: nct3018y: report chassis intrusion through hwmon
Date: Thu, 1 Oct 2026 05:29:02 -0700 [thread overview]
Message-ID: <45520c29-aadd-48ab-a67c-a3b9ee4f3277@roeck-us.net> (raw)
In-Reply-To: <20261001072948351dc257@mail.local>
On Thu, Oct 01, 2026 at 09:29:48AM +0200, Alexandre Belloni wrote:
> On 01/10/2026 05:48:21+0000, sashiko-bot@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [Medium] rtc: nct3018y: hwmon device registration violates layering guidelines
> > --
> >
> > commit 12bf4b0b27866f7565ebcc7b10db8faf4943fb10
> > Author: Eric Liu <liuer@nvidia.com>
> >
> > rtc: nct3018y: report chassis intrusion through hwmon
> >
> > This patch adds an hwmon intrusion alarm for the chip's chassis intrusion
> > latch. Reading it says whether the chassis has been opened since the latch was
> > last cleared; writing 0 clears it and re-arms.
> >
> > > diff --git a/drivers/rtc/rtc-nct3018y.c b/drivers/rtc/rtc-nct3018y.c
> > > index 2f7ad57057a4b..194ba077363aa 100644
> > > --- a/drivers/rtc/rtc-nct3018y.c
> > > +++ b/drivers/rtc/rtc-nct3018y.c
> >
> > [ ... ]
> >
> > > @@ -491,6 +494,95 @@ static const struct rtc_class_ops nct3018y_rtc_ops = {
> > > .ioctl = nct3018y_ioctl,
> > > };
> > >
> > > +#if IS_REACHABLE(CONFIG_HWMON)
> >
> > [ ... ]
> >
> > > +static void nct3018y_hwmon_register(struct nct3018y *nct3018y)
> > > +{
> > > + struct device *dev;
> > > +
> > > + dev = devm_hwmon_device_register_with_info(&nct3018y->client->dev,
> > > + "nct3018y", nct3018y,
> > > + &nct3018y_hwmon_chip_info,
> > > + NULL);
> > [Severity: Medium]
> > Does this violate the hardware monitoring subsystem architecture rules?
> >
> > Registering a hardware monitoring device directly from within
> > nct3018y_hwmon_register() in drivers/rtc/rtc-nct3018y.c bypasses hwmon
> > maintainer review and pollutes the RTC driver with secondary hardware
> > monitoring code.
> >
> > Could this hwmon functionality be decoupled via an auxiliary device driver
> > located in the hwmon subsystem directory instead?
>
> While this is not an issue to register the hwmon driver from rtc, this
> still needs a review from the hwmon maintainers.
I don't usually do that, because I have been told several times from people
submitting hwmon drivers outside drivers/hwmon that I am clueless about
hardware monitoring. From my perspective, every hwmon driver outside
drivers/hwmon gets a free ride and is the responsibility of the subsystem
maintainer.
Guenter
prev parent reply other threads:[~2026-10-01 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 5:41 [PATCH] rtc: nct3018y: report chassis intrusion through hwmon Eric Liu
2026-10-01 5:48 ` sashiko-bot
2026-10-01 7:29 ` Alexandre Belloni
2026-10-01 12:29 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45520c29-aadd-48ab-a67c-a3b9ee4f3277@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=liuer@nvidia.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox