From: sashiko-bot@kernel.org
To: "Zinc Lim" <limzhineng2@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH net-next v2 5/6] eth: fbnic: report temperature and voltage alarms via hwmon
Date: Tue, 25 Aug 2026 17:51:24 +0000 [thread overview]
Message-ID: <20260825175124.9D0271F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260824175059.2485048-6-limzhineng2@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] Hardware monitoring functionality is implemented directly within the network driver directory instead of using the auxiliary device framework to place it in drivers/hwmon/.
--
--- Patch [5]: [PATCH net-next v2 5/6] eth: fbnic: report temperature and voltage alarms via hwmon ---
commit ce6680b733799ddad39ba8fc00bdbf073f5793f7
Author: Zinc Lim <limzhineng2@gmail.com>
eth: fbnic: report temperature and voltage alarms via hwmon
This commit exposes temperature and voltage alarm attributes through the hwmon
interface based on static thresholds stored in fbnic_fw_cap. The alarms are
computed dynamically by taking live sensor readings and comparing them against
these thresholds.
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c b/drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c
> index 4938f7b391402..c5cddd9cef124 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c
[ ... ]
[Severity: Medium]
This is a pre-existing issue, but I noticed an architectural violation in how
the hardware monitoring functionality is registered in this file:
drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c:fbnic_hwmon_register() {
...
fbd->hwmon = hwmon_device_register_with_info(fbd->dev, "fbnic",
fbd, &fbnic_chip_info,
NULL);
...
}
Is it appropriate to register this hardware monitoring device directly from
the network driver directory?
According to the hwmon subsystem guidelines, if the main functionality of a
chip is not hardware monitoring, its hardware monitoring functionality should
be implemented as an auxiliary device driver residing in drivers/hwmon/.
Could this direct registration bypass the required layering and maintainer
review for hardware monitoring devices?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824175059.2485048-1-limzhineng2@gmail.com?part=5
next prev parent reply other threads:[~2026-08-25 17:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 17:50 [PATCH net-next v2 0/6] eth: fbnic: expand hwmon sensor support Zinc Lim
2026-08-24 17:50 ` [PATCH net-next v2 1/6] eth: fbnic: move sensor read logic out of fbnic_mac Zinc Lim
2026-08-25 17:51 ` sashiko-bot
2026-08-24 17:50 ` [PATCH net-next v2 2/6] eth: fbnic: expose all hwmon attributes unconditionally as read-only Zinc Lim
2026-08-25 17:51 ` sashiko-bot
2026-08-24 17:50 ` [PATCH net-next v2 3/6] eth: fbnic: cache hwmon sensor readings Zinc Lim
2026-08-25 17:51 ` sashiko-bot
2026-08-24 17:50 ` [PATCH net-next v2 4/6] eth: fbnic: report temperature and voltage thresholds via hwmon Zinc Lim
2026-08-25 17:51 ` sashiko-bot
2026-08-24 17:50 ` [PATCH net-next v2 5/6] eth: fbnic: report temperature and voltage alarms " Zinc Lim
2026-08-25 17:51 ` sashiko-bot [this message]
2026-08-24 17:50 ` [PATCH net-next v2 6/6] eth: fbnic: firmware notifies hwmon on sensor threshold events Zinc Lim
2026-08-25 17:51 ` sashiko-bot
2026-08-24 20:02 ` [PATCH net-next v2 0/6] eth: fbnic: expand hwmon sensor support Jakub Kicinski
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=20260825175124.9D0271F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=limzhineng2@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--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