[PATCH 3/5] drm/xe: make hwmon_info const

Thomas Hellström thomas.hellstrom at linux.intel.com
Wed Jan 17 12:38:12 UTC 2024


On Wed, 2024-01-17 at 14:20 +0200, Jani Nikula wrote:
> Make hwmon_info a const array of const pointers, and let it be placed
> in
> rodata.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>

> 
> ---
> 
> Note: Lots more in this file will end up in rodata with the hwmon
> change:
> 
> https://lore.kernel.org/r/20240117114405.1506775-1-jani.nikula@intel.com
> ---
>  drivers/gpu/drm/xe/xe_hwmon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c
> b/drivers/gpu/drm/xe/xe_hwmon.c
> index 6ef2aa1eae8b..e6acdf682d2a 100644
> --- a/drivers/gpu/drm/xe/xe_hwmon.c
> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> @@ -402,7 +402,7 @@ static const struct attribute_group
> *hwmon_groups[] = {
>  	NULL
>  };
>  
> -static const struct hwmon_channel_info *hwmon_info[] = {
> +static const struct hwmon_channel_info * const hwmon_info[] = {
>  	HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX |
> HWMON_P_CRIT),
>  	HWMON_CHANNEL_INFO(curr, HWMON_C_CRIT),
>  	HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),



More information about the Intel-xe mailing list