Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: marvell: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230407145911.79642-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Jakub Kicinski
ff0805e2 211f70be

+2 -2
+1 -1
drivers/net/phy/marvell.c
··· 2735 2735 .config = marvell_hwmon_temp_config, 2736 2736 }; 2737 2737 2738 - static const struct hwmon_channel_info *marvell_hwmon_info[] = { 2738 + static const struct hwmon_channel_info * const marvell_hwmon_info[] = { 2739 2739 &marvell_hwmon_chip, 2740 2740 &marvell_hwmon_temp, 2741 2741 NULL
+1 -1
drivers/net/phy/marvell10g.c
··· 243 243 .config = mv3310_hwmon_temp_config, 244 244 }; 245 245 246 - static const struct hwmon_channel_info *mv3310_hwmon_info[] = { 246 + static const struct hwmon_channel_info * const mv3310_hwmon_info[] = { 247 247 &mv3310_hwmon_chip, 248 248 &mv3310_hwmon_temp, 249 249 NULL,