linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures
@ 2017-06-21  7:04 Bhumika Goyal
  2017-06-21  7:04 ` [PATCH 1/2] acerhdf: add const to thermal_cooling_device_ops structure Bhumika Goyal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-06-21  7:04 UTC (permalink / raw)
  To: julia.lawall, peter, dvhart, andy, platform-driver-x86,
	linux-kernel, sujith.thomas
  Cc: Bhumika Goyal

Declare thermal_cooling_device_ops structures as const.

Bhumika Goyal (2):
  acerhdf: add const to thermal_cooling_device_ops structure
  intel_menlow: add const to thermal_cooling_device_ops structure

 drivers/platform/x86/acerhdf.c      | 2 +-
 drivers/platform/x86/intel_menlow.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

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

* [PATCH 1/2] acerhdf: add const to thermal_cooling_device_ops structure
  2017-06-21  7:04 [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Bhumika Goyal
@ 2017-06-21  7:04 ` Bhumika Goyal
  2017-06-21  7:04 ` [PATCH 2/2] intel_menlow: " Bhumika Goyal
  2017-06-21 21:14 ` [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Darren Hart
  2 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-06-21  7:04 UTC (permalink / raw)
  To: julia.lawall, peter, dvhart, andy, platform-driver-x86,
	linux-kernel, sujith.thomas
  Cc: Bhumika Goyal

Declare thermal_cooling_device_ops structure as const as it is only passed
as an argument to the function thermal_cooling_device_register and this
argument is of type const. So, declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/platform/x86/acerhdf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 2acdb0d..ea22591 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -557,7 +557,7 @@ static int acerhdf_set_cur_state(struct thermal_cooling_device *cdev,
 }
 
 /* bind fan callbacks to fan device */
-static struct thermal_cooling_device_ops acerhdf_cooling_ops = {
+static const struct thermal_cooling_device_ops acerhdf_cooling_ops = {
 	.get_max_state = acerhdf_get_max_state,
 	.get_cur_state = acerhdf_get_cur_state,
 	.set_cur_state = acerhdf_set_cur_state,
-- 
2.7.4

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

* [PATCH 2/2] intel_menlow: add const to thermal_cooling_device_ops structure
  2017-06-21  7:04 [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Bhumika Goyal
  2017-06-21  7:04 ` [PATCH 1/2] acerhdf: add const to thermal_cooling_device_ops structure Bhumika Goyal
@ 2017-06-21  7:04 ` Bhumika Goyal
  2017-06-21 21:14 ` [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Darren Hart
  2 siblings, 0 replies; 4+ messages in thread
From: Bhumika Goyal @ 2017-06-21  7:04 UTC (permalink / raw)
  To: julia.lawall, peter, dvhart, andy, platform-driver-x86,
	linux-kernel, sujith.thomas
  Cc: Bhumika Goyal

Declare thermal_cooling_device_ops structure as const as it is only passed
as an argument to the function thermal_cooling_device_register and this
argument is of type const. So, declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/platform/x86/intel_menlow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_menlow.c b/drivers/platform/x86/intel_menlow.c
index cbe0102..ef9b0af 100644
--- a/drivers/platform/x86/intel_menlow.c
+++ b/drivers/platform/x86/intel_menlow.c
@@ -142,7 +142,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
 	return 0;
 }
 
-static struct thermal_cooling_device_ops memory_cooling_ops = {
+static const struct thermal_cooling_device_ops memory_cooling_ops = {
 	.get_max_state = memory_get_max_bandwidth,
 	.get_cur_state = memory_get_cur_bandwidth,
 	.set_cur_state = memory_set_cur_bandwidth,
-- 
2.7.4

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

* Re: [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures
  2017-06-21  7:04 [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Bhumika Goyal
  2017-06-21  7:04 ` [PATCH 1/2] acerhdf: add const to thermal_cooling_device_ops structure Bhumika Goyal
  2017-06-21  7:04 ` [PATCH 2/2] intel_menlow: " Bhumika Goyal
@ 2017-06-21 21:14 ` Darren Hart
  2 siblings, 0 replies; 4+ messages in thread
From: Darren Hart @ 2017-06-21 21:14 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, peter, andy, platform-driver-x86, linux-kernel,
	sujith.thomas

On Wed, Jun 21, 2017 at 12:34:15PM +0530, Bhumika Goyal wrote:
> Declare thermal_cooling_device_ops structures as const.
> 

Thanks, applied to testing.

> Bhumika Goyal (2):
>   acerhdf: add const to thermal_cooling_device_ops structure
>   intel_menlow: add const to thermal_cooling_device_ops structure
> 
>  drivers/platform/x86/acerhdf.c      | 2 +-
>  drivers/platform/x86/intel_menlow.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> -- 
> 2.7.4
> 
> 

-- 
Darren Hart
VMware Open Source Technology Center

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

end of thread, other threads:[~2017-06-21 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21  7:04 [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Bhumika Goyal
2017-06-21  7:04 ` [PATCH 1/2] acerhdf: add const to thermal_cooling_device_ops structure Bhumika Goyal
2017-06-21  7:04 ` [PATCH 2/2] intel_menlow: " Bhumika Goyal
2017-06-21 21:14 ` [PATCH 0/2] platform/x86: add const to thermal_cooling_device_ops structures Darren Hart

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).