All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops
@ 2018-04-08 12:01 srplinux2008
  2018-04-09 11:56 ` Thierry Reding
  2018-05-06 22:50 ` Eduardo Valentin
  0 siblings, 2 replies; 3+ messages in thread
From: srplinux2008 @ 2018-04-08 12:01 UTC (permalink / raw)
  To: thierry.reding, jonathanh, linux-tegra
  Cc: rui.zhang, edubezval, linux-kernel, linux-pm, srplinux2008

From: srp linux <srplinux2008@gmail.com>

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.

Signed-off-by: srp linux <srplinux2008@gmail.com>
---
 drivers/thermal/tegra/soctherm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 455b58c..72da745 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -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,
-- 
2.7.4

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

* Re: [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops
  2018-04-08 12:01 [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops srplinux2008
@ 2018-04-09 11:56 ` Thierry Reding
  2018-05-06 22:50 ` Eduardo Valentin
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2018-04-09 11:56 UTC (permalink / raw)
  To: srplinux2008
  Cc: jonathanh, linux-tegra, rui.zhang, edubezval, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

On Sun, Apr 08, 2018 at 05:31:45PM +0530, srplinux2008 wrote:
> From: srp linux <srplinux2008@gmail.com>

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

	$ git config user.name 'Your Name'

> 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.
> 
> Signed-off-by: srp linux <srplinux2008@gmail.com>
> ---
>  drivers/thermal/tegra/soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops
  2018-04-08 12:01 [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops srplinux2008
  2018-04-09 11:56 ` Thierry Reding
@ 2018-05-06 22:50 ` Eduardo Valentin
  1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Valentin @ 2018-05-06 22:50 UTC (permalink / raw)
  To: srplinux2008
  Cc: thierry.reding, jonathanh, linux-tegra, rui.zhang, linux-kernel,
	linux-pm

On Sun, Apr 08, 2018 at 05:31:45PM +0530, srplinux2008 wrote:
> From: srp linux <srplinux2008@gmail.com>
> 
> 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.
> 
> Signed-off-by: srp linux <srplinux2008@gmail.com>

Please resend with your real name.

Thanks

> ---
>  drivers/thermal/tegra/soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
> index 455b58c..72da745 100644
> --- a/drivers/thermal/tegra/soctherm.c
> +++ b/drivers/thermal/tegra/soctherm.c
> @@ -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,
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2018-05-06 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-08 12:01 [PATCH] thermal: tegra: soctherm: add const to struct thermal_cooling_device_ops srplinux2008
2018-04-09 11:56 ` Thierry Reding
2018-05-06 22:50 ` Eduardo Valentin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.