From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Igor Russkikh" <irusskikh@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <simon.horman@corigine.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Marek Behún" <kabel@kernel.org>, "Xu Liang" <lxu@maxlinear.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
oss-drivers@corigine.com
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org
Subject: [PATCH 5/8] net: phy: marvell: constify pointers to hwmon_channel_info
Date: Fri, 7 Apr 2023 16:59:08 +0200 [thread overview]
Message-ID: <20230407145911.79642-5-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20230407145911.79642-1-krzysztof.kozlowski@linaro.org>
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This depends on hwmon core patch:
https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/
Therefore I propose this should also go via hwmon tree.
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
---
drivers/net/phy/marvell.c | 2 +-
drivers/net/phy/marvell10g.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 63a3644d86c9..24853e9a889e 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -2735,7 +2735,7 @@ static const struct hwmon_channel_info marvell_hwmon_temp = {
.config = marvell_hwmon_temp_config,
};
-static const struct hwmon_channel_info *marvell_hwmon_info[] = {
+static const struct hwmon_channel_info * const marvell_hwmon_info[] = {
&marvell_hwmon_chip,
&marvell_hwmon_temp,
NULL
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 383a9c9f36e5..55d9d7acc32e 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -243,7 +243,7 @@ static const struct hwmon_channel_info mv3310_hwmon_temp = {
.config = mv3310_hwmon_temp_config,
};
-static const struct hwmon_channel_info *mv3310_hwmon_info[] = {
+static const struct hwmon_channel_info * const mv3310_hwmon_info[] = {
&mv3310_hwmon_chip,
&mv3310_hwmon_temp,
NULL,
--
2.34.1
next prev parent reply other threads:[~2023-04-07 15:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 14:59 [PATCH 1/8] net: netronome: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-04-07 14:59 ` [PATCH 2/8] net: aquantia: " Krzysztof Kozlowski
2023-04-07 14:59 ` [PATCH 3/8] net: phy: " Krzysztof Kozlowski
2023-04-07 15:04 ` Andrew Lunn
2023-04-07 14:59 ` [PATCH 4/8] net: phy: bcm54140: " Krzysztof Kozlowski
2023-04-07 15:04 ` Andrew Lunn
2023-04-07 14:59 ` Krzysztof Kozlowski [this message]
2023-04-07 15:04 ` [PATCH 5/8] net: phy: marvell: " Andrew Lunn
2023-04-07 14:59 ` [PATCH 6/8] net: phy: mxl: " Krzysztof Kozlowski
2023-04-07 15:05 ` Andrew Lunn
2023-04-07 14:59 ` [PATCH 7/8] net: phy: nxp-tja11xx: " Krzysztof Kozlowski
2023-04-07 15:05 ` Andrew Lunn
2023-04-07 14:59 ` [PATCH 8/8] net: phy: sfp: " Krzysztof Kozlowski
2023-04-07 15:05 ` Andrew Lunn
2023-04-07 15:47 ` [PATCH 1/8] net: netronome: " Jakub Kicinski
2023-04-07 18:05 ` Guenter Roeck
2023-04-08 1:10 ` Jakub Kicinski
2023-04-08 10:44 ` Krzysztof Kozlowski
2023-04-07 16:07 ` Simon Horman
2023-04-07 18:17 ` Simon Horman
2023-04-07 23:07 ` Guenter Roeck
2023-04-10 2:20 ` patchwork-bot+netdevbpf
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=20230407145911.79642-5-krzysztof.kozlowski@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=irusskikh@marvell.com \
--cc=jdelvare@suse.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
/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;
as well as URLs for NNTP newsgroup(s).