]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: nfp: constify pointers to hwmon_channel_info
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 7 Apr 2023 14:59:04 +0000 (16:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Apr 2023 02:02:03 +0000 (19:02 -0700)
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230407145911.79642-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_hwmon.c

index 5cabb1aa9c0cc11db1c48b9e635a2984495dfd82..0d6c59d6d4aed048b322b589f41b7256f4924e75 100644 (file)
@@ -115,7 +115,7 @@ static const struct hwmon_channel_info nfp_power = {
        .config = nfp_power_config,
 };
 
-static const struct hwmon_channel_info *nfp_hwmon_info[] = {
+static const struct hwmon_channel_info * const nfp_hwmon_info[] = {
        &nfp_chip,
        &nfp_temp,
        &nfp_power,