* [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info
@ 2023-05-11 17:56 Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 2/4] platform/x86: hp: " Krzysztof Kozlowski
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
To: Thomas Weißschuh, Hans de Goede, Mark Gross, Jeremy Soller,
System76 Product Development, Azael Avalos, platform-driver-x86,
linux-kernel
Cc: Krzysztof Kozlowski
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.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 8aa665e866b8..f6ba88baee4d 100644
--- a/drivers/platform/x86/gigabyte-wmi.c
+++ b/drivers/platform/x86/gigabyte-wmi.c
@@ -94,7 +94,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,
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND PATCH 2/4] platform/x86: hp: constify pointers to hwmon_channel_info
2023-05-11 17:56 [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 3/4] platform/x86: system76: " Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
To: Thomas Weißschuh, Hans de Goede, Mark Gross, Jeremy Soller,
System76 Product Development, Azael Avalos, platform-driver-x86,
linux-kernel
Cc: Krzysztof Kozlowski
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/platform/x86/hp/hp-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 2749433b713f..7eb66cfef208 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -1536,7 +1536,7 @@ static int hp_wmi_hwmon_write(struct device *dev, enum hwmon_sensor_types type,
}
}
-static const struct hwmon_channel_info *info[] = {
+static const struct hwmon_channel_info * const info[] = {
HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT, HWMON_F_INPUT),
HWMON_CHANNEL_INFO(pwm, HWMON_PWM_ENABLE),
NULL
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND PATCH 3/4] platform/x86: system76: constify pointers to hwmon_channel_info
2023-05-11 17:56 [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 2/4] platform/x86: hp: " Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 4/4] platform/x86: toshiba: " Krzysztof Kozlowski
2023-05-15 13:22 ` [RESEND PATCH 1/4] platform/x86: gigabyte: " Hans de Goede
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
To: Thomas Weißschuh, Hans de Goede, Mark Gross, Jeremy Soller,
System76 Product Development, Azael Avalos, platform-driver-x86,
linux-kernel
Cc: Krzysztof Kozlowski
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/platform/x86/system76_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/system76_acpi.c b/drivers/platform/x86/system76_acpi.c
index 97f5a8255b91..fc4708fa6ebe 100644
--- a/drivers/platform/x86/system76_acpi.c
+++ b/drivers/platform/x86/system76_acpi.c
@@ -581,7 +581,7 @@ static const struct hwmon_ops thermal_ops = {
};
// Allocate up to 8 fans and temperatures
-static const struct hwmon_channel_info *thermal_channel_info[] = {
+static const struct hwmon_channel_info * const thermal_channel_info[] = {
HWMON_CHANNEL_INFO(fan,
HWMON_F_INPUT | HWMON_F_LABEL,
HWMON_F_INPUT | HWMON_F_LABEL,
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND PATCH 4/4] platform/x86: toshiba: constify pointers to hwmon_channel_info
2023-05-11 17:56 [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 2/4] platform/x86: hp: " Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 3/4] platform/x86: system76: " Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
2023-05-15 13:22 ` [RESEND PATCH 1/4] platform/x86: gigabyte: " Hans de Goede
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
To: Thomas Weißschuh, Hans de Goede, Mark Gross, Jeremy Soller,
System76 Product Development, Azael Avalos, platform-driver-x86,
linux-kernel
Cc: Krzysztof Kozlowski
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/platform/x86/toshiba_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index b34984bbee33..291f14ef6702 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -3037,7 +3037,7 @@ static int toshiba_acpi_hwmon_read(struct device *dev, enum hwmon_sensor_types t
return -EOPNOTSUPP;
}
-static const struct hwmon_channel_info *toshiba_acpi_hwmon_info[] = {
+static const struct hwmon_channel_info * const toshiba_acpi_hwmon_info[] = {
HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT),
NULL
};
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info
2023-05-11 17:56 [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-05-11 17:56 ` [RESEND PATCH 4/4] platform/x86: toshiba: " Krzysztof Kozlowski
@ 2023-05-15 13:22 ` Hans de Goede
3 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2023-05-15 13:22 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thomas Weißschuh, Mark Gross,
Jeremy Soller, System76 Product Development, Azael Avalos,
platform-driver-x86, linux-kernel
Hi,
On 5/11/23 19:56, Krzysztof Kozlowski wrote:
> Statically allocated array of pointers to hwmon_channel_info can be made
> const for safety.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> 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 8aa665e866b8..f6ba88baee4d 100644
> --- a/drivers/platform/x86/gigabyte-wmi.c
> +++ b/drivers/platform/x86/gigabyte-wmi.c
> @@ -94,7 +94,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,
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-15 13:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11 17:56 [RESEND PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 2/4] platform/x86: hp: " Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 3/4] platform/x86: system76: " Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 4/4] platform/x86: toshiba: " Krzysztof Kozlowski
2023-05-15 13:22 ` [RESEND PATCH 1/4] platform/x86: gigabyte: " Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®