Re: [PATCH] hwmon: put HWMON_CHANNEL_INFO() initializers in rodata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 17, 2024 at 01:44:05PM +0200, Jani Nikula wrote:
> HWMON_CHANNEL_INFO() is supposed to be used as initializer for arrays of
> const struct hwmon_channel_info *. However, without explicit const,
> HWMON_CHANNEL_INFO() creates mutable compound literals, and the const
> pointers point at the mutable data. Add const to place the data in
> rodata.
> 
> Cc: Jean Delvare <jdelvare@xxxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Applied.

Thanks,
Guenter




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux