Message ID | 20230407150339.80218-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | [1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info | expand |
Hi, On 4/7/23 17:03, Krzysztof Kozlowski wrote: > Statically allocated array of pointed to hwmon_channel_info can be made > const for safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > This depends on hwmon core patch: > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > Therefore I propose this should also go via hwmon tree. Ok, taking all 4 these patches upstream through the hwmon tree is fine by me, here is my Ack for that: Acked-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans p.s. I'm going to drop these from my patch queue now. If for some reason merging these through the hwmon tree does not work out, please resend them after 6.4-rc1 is out (assuming that will have the pre-requisite patch) and then I'll apply them directly. > > Cc: Jean Delvare <jdelvare@suse.com> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: linux-hwmon@vger.kernel.org > --- > drivers/platform/x86/gigabyte-wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/gigabyte-wmi.c b/drivers/platform/x86/gigabyte-wmi.c > index 5e5b17c50eb6..7cc969fb1beb 100644 > --- a/drivers/platform/x86/gigabyte-wmi.c > +++ b/drivers/platform/x86/gigabyte-wmi.c > @@ -99,7 +99,7 @@ static umode_t gigabyte_wmi_hwmon_is_visible(const void *data, enum hwmon_sensor > return usable_sensors_mask & BIT(channel) ? 0444 : 0; > } > > -static const struct hwmon_channel_info *gigabyte_wmi_hwmon_info[] = { > +static const struct hwmon_channel_info * const gigabyte_wmi_hwmon_info[] = { > HWMON_CHANNEL_INFO(temp, > HWMON_T_INPUT, > HWMON_T_INPUT,
diff --git a/drivers/platform/x86/gigabyte-wmi.c b/drivers/platform/x86/gigabyte-wmi.c index 5e5b17c50eb6..7cc969fb1beb 100644 --- a/drivers/platform/x86/gigabyte-wmi.c +++ b/drivers/platform/x86/gigabyte-wmi.c @@ -99,7 +99,7 @@ static umode_t gigabyte_wmi_hwmon_is_visible(const void *data, enum hwmon_sensor return usable_sensors_mask & BIT(channel) ? 0444 : 0; } -static const struct hwmon_channel_info *gigabyte_wmi_hwmon_info[] = { +static const struct hwmon_channel_info * const gigabyte_wmi_hwmon_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT, HWMON_T_INPUT,
Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- This depends on hwmon core patch: https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ Therefore I propose this should also go via hwmon tree. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org --- drivers/platform/x86/gigabyte-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)