drm/nouveau: constify pointers to hwmon_channel_info
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 11 May 2023 17:54:43 +0000 (19:54 +0200)
committerKarol Herbst <kherbst@redhat.com>
Mon, 22 May 2023 14:39:04 +0000 (16:39 +0200)
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.

Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230511175443.281970-1-krzysztof.kozlowski@linaro.org
drivers/gpu/drm/nouveau/nouveau_hwmon.c

index e844be4..db30a4c 100644 (file)
@@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
 
 #define N_ATTR_GROUPS   3
 
-static const struct hwmon_channel_info *nouveau_info[] = {
+static const struct hwmon_channel_info * const nouveau_info[] = {
        HWMON_CHANNEL_INFO(chip,
                           HWMON_C_UPDATE_INTERVAL),
        HWMON_CHANNEL_INFO(temp,