linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info
@ 2023-05-11 17:56 Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 2/4] rtc: ds3232: " 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: Alessandro Zummo, Alexandre Belloni, linux-rtc, 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/rtc/rtc-ab-eoz9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index 34611f6dedcb..143650cb7822 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -455,7 +455,7 @@ static const struct hwmon_channel_info abeoz9_temp = {
 	.config = abeoz9_temp_config,
 };
 
-static const struct hwmon_channel_info *abeoz9_info[] = {
+static const struct hwmon_channel_info * const abeoz9_info[] = {
 	&abeoz9_chip,
 	&abeoz9_temp,
 	NULL
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RESEND PATCH 2/4] rtc: ds3232: constify pointers to hwmon_channel_info
  2023-05-11 17:56 [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 3/4] rtc: isl12022: " 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: Alessandro Zummo, Alexandre Belloni, linux-rtc, 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/rtc/rtc-ds3232.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index dd31a60c1fc6..ce46016c9fd8 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -359,7 +359,7 @@ static const struct hwmon_channel_info ds3232_hwmon_temp = {
 	.config = ds3232_hwmon_temp_config,
 };
 
-static const struct hwmon_channel_info *ds3232_hwmon_info[] = {
+static const struct hwmon_channel_info * const ds3232_hwmon_info[] = {
 	&ds3232_hwmon_chip,
 	&ds3232_hwmon_temp,
 	NULL
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RESEND PATCH 3/4] rtc: isl12022: constify pointers to hwmon_channel_info
  2023-05-11 17:56 [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 2/4] rtc: ds3232: " Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 4/4] rtc: rv3032: " Krzysztof Kozlowski
  2023-06-06 21:27 ` [RESEND PATCH 1/4] rtc: ab-eoz9: " Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc, 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/rtc/rtc-isl12022.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c
index e68a79b5e00e..eef66453841f 100644
--- a/drivers/rtc/rtc-isl12022.c
+++ b/drivers/rtc/rtc-isl12022.c
@@ -89,7 +89,7 @@ static int isl12022_hwmon_read(struct device *dev,
 	return -EOPNOTSUPP;
 }
 
-static const struct hwmon_channel_info *isl12022_hwmon_info[] = {
+static const struct hwmon_channel_info * const isl12022_hwmon_info[] = {
 	HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
 	NULL
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [RESEND PATCH 4/4] rtc: rv3032: constify pointers to hwmon_channel_info
  2023-05-11 17:56 [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 2/4] rtc: ds3232: " Krzysztof Kozlowski
  2023-05-11 17:56 ` [RESEND PATCH 3/4] rtc: isl12022: " Krzysztof Kozlowski
@ 2023-05-11 17:56 ` Krzysztof Kozlowski
  2023-06-06 21:27 ` [RESEND PATCH 1/4] rtc: ab-eoz9: " Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 17:56 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc, 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/rtc/rtc-rv3032.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index 1ff4f2e6fa77..7b36e7f125f7 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -842,7 +842,7 @@ static int rv3032_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
 	return err;
 }
 
-static const struct hwmon_channel_info *rv3032_hwmon_info[] = {
+static const struct hwmon_channel_info * const rv3032_hwmon_info[] = {
 	HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ),
 	HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST),
 	NULL
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info
  2023-05-11 17:56 [RESEND PATCH 1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-05-11 17:56 ` [RESEND PATCH 4/4] rtc: rv3032: " Krzysztof Kozlowski
@ 2023-06-06 21:27 ` Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2023-06-06 21:27 UTC (permalink / raw)
  To: Alessandro Zummo, linux-rtc, linux-kernel, Krzysztof Kozlowski


On Thu, 11 May 2023 19:56:06 +0200, Krzysztof Kozlowski wrote:
> Statically allocated array of pointers to hwmon_channel_info can be made
> const for safety.
> 
> 

Applied, thanks!

[1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info
      commit: 973ef08456f8c6aea4672ae986dfe907b9e4fdc3
[2/4] rtc: ds3232: constify pointers to hwmon_channel_info
      commit: d00caa55cecd3e833c21c9372fc558cb9f40a07f
[3/4] rtc: isl12022: constify pointers to hwmon_channel_info
      commit: 303b1e894470421f7c5b6452937fc8c1f0f89075
[4/4] rtc: rv3032: constify pointers to hwmon_channel_info
      commit: b19118965778da3ba9fbeeca39bdf24738d229b4

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-06 21:27 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] rtc: ab-eoz9: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 2/4] rtc: ds3232: " Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 3/4] rtc: isl12022: " Krzysztof Kozlowski
2023-05-11 17:56 ` [RESEND PATCH 4/4] rtc: rv3032: " Krzysztof Kozlowski
2023-06-06 21:27 ` [RESEND PATCH 1/4] rtc: ab-eoz9: " Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).