Skip to contentSkip to conversation

thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops

PATCH In review srplinux2008 3 participants 3 messages Apr 8, 2018 – May 6, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops

From: srp linux <[email protected]>

Correct the typecast with const to struct thermal_cooling_device_ops. It is the last argument to the function thermal_of_cooling_device_register and this argument is of type const. So, declare this structure thermal_cooling_device_ops as constant.

---
 drivers/thermal/tegra/soctherm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/tegra/soctherm.c +1 -1
index 455b58c..72da745 100644
@@ -926,7 +926,7 @@ static int throt_set_cdev_state(struct thermal_cooling_device *cdev,
 	return 0;
 }
 
-static struct thermal_cooling_device_ops throt_cooling_ops = {
+static const struct thermal_cooling_device_ops throt_cooling_ops = {
 	.get_max_state = throt_get_cdev_max_state,
 	.get_cur_state = throt_get_cdev_cur_state,
 	.set_cur_state = throt_set_cdev_state,
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · On Sun, Apr 08, 2018 at 05:31:45PM +0530, srplinux2008 wrote:

From: srp linux <[email protected]>

Looks like you haven't properly set up git. Try setting your real name using:

	$ git config user.name 'Your Name'
Quoted 9 lines

Correct the typecast with const to struct thermal_cooling_device_ops. It is the last argument to the function thermal_of_cooling_device_register and this argument is of type const. So, declare this structure thermal_cooling_device_ops as constant.

---
 drivers/thermal/tegra/soctherm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw
In reply to srplinux2008
Quoted 8 lines · On Sun, Apr 08, 2018 at 05:31:45PM +0530, srplinux2008 wrote:

From: srp linux <[email protected]>

Correct the typecast with const to struct thermal_cooling_device_ops. It is the last argument to the function thermal_of_cooling_device_register and this argument is of type const. So, declare this structure thermal_cooling_device_ops as constant.

Please resend with your real name.

Thanks

Quoted 20 lines
---
 drivers/thermal/tegra/soctherm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/tegra/soctherm.c +1 -1
index 455b58c..72da745 100644
@@ -926,7 +926,7 @@ static int throt_set_cdev_state(struct thermal_cooling_device *cdev,
 	return 0;
 }
 
-static struct thermal_cooling_device_ops throt_cooling_ops = {
+static const struct thermal_cooling_device_ops throt_cooling_ops = {
 	.get_max_state = throt_get_cdev_max_state,
 	.get_cur_state = throt_get_cdev_cur_state,
 	.set_cur_state = throt_set_cdev_state,
Signature · 1 line
2.7.4