* [PATCH] thermal: solve compilation errors in rcar_thermal
@ 2012-08-21 16:31 Devendra Naga
2012-08-28 1:05 ` Kuninori Morimoto
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Devendra Naga @ 2012-08-21 16:31 UTC (permalink / raw)
To: Andrew Morton, Zhang Rui, Kuninori Morimoto, linux-kernel; +Cc: Devendra Naga
following were the errors reported
drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
include/linux/thermal.h:166:29: note: declared here
make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
make: *** [drivers/thermal/rcar_thermal.o] Error 2
with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---
drivers/thermal/rcar_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index d445271..f7a1b57 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
goto error_free_priv;
}
- zone = thermal_zone_device_register("rcar_thermal", 0, priv,
+ zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
&rcar_thermal_zone_ops, 0, 0);
if (IS_ERR(zone)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] thermal: solve compilation errors in rcar_thermal
2012-08-21 16:31 [PATCH] thermal: solve compilation errors in rcar_thermal Devendra Naga
@ 2012-08-28 1:05 ` Kuninori Morimoto
2012-10-03 6:51 ` [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap() Kuninori Morimoto
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2012-08-28 1:05 UTC (permalink / raw)
To: Devendra Naga; +Cc: Andrew Morton, Zhang Rui, linux-kernel
Hi
> following were the errors reported
>
> drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
> drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
> include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
> drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
> include/linux/thermal.h:166:29: note: declared here
> make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
> make: *** [drivers/thermal/rcar_thermal.o] Error 2
>
> with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap()
2012-08-21 16:31 [PATCH] thermal: solve compilation errors in rcar_thermal Devendra Naga
2012-08-28 1:05 ` Kuninori Morimoto
@ 2012-10-03 6:51 ` Kuninori Morimoto
2012-11-07 3:32 ` Zhang Rui
2012-10-09 8:14 ` [PATCH] thermal: rcar: fixup compilation errors Kuninori Morimoto
2012-10-31 3:21 ` [PATCH] thermal: solve compilation errors in rcar_thermal Kuninori Morimoto
3 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2012-10-03 6:51 UTC (permalink / raw)
To: Zhang Rui, Andrew Morton; +Cc: Kuninori Morimoto, linux-kernel
devm_kfree and devm_iounmap should not have to be explicitly used
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
This patch is based on Devendra's
[PATCH] thermal: solve compilation errors in rcar_thermal
drivers/thermal/rcar_thermal.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 762f637..81dce23 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -185,7 +185,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
struct thermal_zone_device *zone;
struct rcar_thermal_priv *priv;
struct resource *res;
- int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -206,16 +205,14 @@ static int rcar_thermal_probe(struct platform_device *pdev)
res->start, resource_size(res));
if (!priv->base) {
dev_err(&pdev->dev, "Unable to ioremap thermal register\n");
- ret = -ENOMEM;
- goto error_free_priv;
+ return -ENOMEM;
}
zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
&rcar_thermal_zone_ops, NULL, 0, 0);
if (IS_ERR(zone)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
- ret = PTR_ERR(zone);
- goto error_iounmap;
+ return PTR_ERR(zone);
}
platform_set_drvdata(pdev, zone);
@@ -223,26 +220,15 @@ static int rcar_thermal_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "proved\n");
return 0;
-
-error_iounmap:
- devm_iounmap(&pdev->dev, priv->base);
-error_free_priv:
- devm_kfree(&pdev->dev, priv);
-
- return ret;
}
static int rcar_thermal_remove(struct platform_device *pdev)
{
struct thermal_zone_device *zone = platform_get_drvdata(pdev);
- struct rcar_thermal_priv *priv = zone->devdata;
thermal_zone_device_unregister(zone);
platform_set_drvdata(pdev, NULL);
- devm_iounmap(&pdev->dev, priv->base);
- devm_kfree(&pdev->dev, priv);
-
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] thermal: rcar: fixup compilation errors
2012-08-21 16:31 [PATCH] thermal: solve compilation errors in rcar_thermal Devendra Naga
2012-08-28 1:05 ` Kuninori Morimoto
2012-10-03 6:51 ` [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap() Kuninori Morimoto
@ 2012-10-09 8:14 ` Kuninori Morimoto
2012-11-07 3:34 ` Zhang Rui
2012-10-31 3:21 ` [PATCH] thermal: solve compilation errors in rcar_thermal Kuninori Morimoto
3 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2012-10-09 8:14 UTC (permalink / raw)
To: Andrew Morton, Zhang Rui, linux-kernel; +Cc: Devendra Naga
This patch fixup following error
${LINUX}/drivers/thermal/rcar_thermal.c: In function 'rcar_thermal_probe':
${LINUX}/drivers/thermal/rcar_thermal.c:214:9: warning: passing argument 3 \
of 'thermal_zone_device_register' makes integer from pointer without\
a cast [enabled by default]
${LINUX}/include/linux/thermal.h:215:29: note: expected 'int' but argument \
is of type 'struct rcar_thermal_priv *'
${LINUX}/drivers/thermal/rcar_thermal.c:214:9:\
error: too few arguments to function 'thermal_zone_device_register'
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
for linus/master branch
drivers/thermal/rcar_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index b13fe5d..762f637 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
goto error_free_priv;
}
- zone = thermal_zone_device_register("rcar_thermal", 0, priv,
+ zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
&rcar_thermal_zone_ops, NULL, 0, 0);
if (IS_ERR(zone)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] thermal: solve compilation errors in rcar_thermal
2012-08-21 16:31 [PATCH] thermal: solve compilation errors in rcar_thermal Devendra Naga
` (2 preceding siblings ...)
2012-10-09 8:14 ` [PATCH] thermal: rcar: fixup compilation errors Kuninori Morimoto
@ 2012-10-31 3:21 ` Kuninori Morimoto
2012-10-31 6:24 ` Zhang, Rui
2012-11-01 2:29 ` Fengguang Wu
3 siblings, 2 replies; 11+ messages in thread
From: Kuninori Morimoto @ 2012-10-31 3:21 UTC (permalink / raw)
To: Andrew Morton, Zhang Rui, linux-kernel; +Cc: fengguang.wu
Hi Zhang, Andrew
This patch is needed on latest linus/master branch.
Please re-check this patch.
And, similar patch was added on linux-next/master branch
b5da4e6d5603633835a1da267e0e699eea66f317
(Thermal: Pass zone parameters as argument to tzd_register)
but it seems wrong (?)
At Tue, 21 Aug 2012 22:01:36 +0530,
Devendra Naga wrote:
>
> following were the errors reported
>
> drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
> drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
> include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
> drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
> include/linux/thermal.h:166:29: note: declared here
> make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
> make: *** [drivers/thermal/rcar_thermal.o] Error 2
>
> with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> ---
> drivers/thermal/rcar_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index d445271..f7a1b57 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> goto error_free_priv;
> }
>
> - zone = thermal_zone_device_register("rcar_thermal", 0, priv,
> + zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> &rcar_thermal_zone_ops, 0, 0);
> if (IS_ERR(zone)) {
> dev_err(&pdev->dev, "thermal zone device is NULL\n");
> --
> 1.7.9.5
>
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] thermal: solve compilation errors in rcar_thermal
2012-10-31 3:21 ` [PATCH] thermal: solve compilation errors in rcar_thermal Kuninori Morimoto
@ 2012-10-31 6:24 ` Zhang, Rui
2012-10-31 8:46 ` Kuninori Morimoto
2012-11-01 2:29 ` Fengguang Wu
1 sibling, 1 reply; 11+ messages in thread
From: Zhang, Rui @ 2012-10-31 6:24 UTC (permalink / raw)
To: Kuninori Morimoto, Andrew Morton, linux-kernel; +Cc: Wu, Fengguang
Sorry, I can not see the original post of this patch.
Can you resend it so that I can apply it?
> -----Original Message-----
> From: kuninori morimoto [mailto:kuninori.morimoto.gx@gmail.com] On
> Behalf Of Kuninori Morimoto
> Sent: Wednesday, October 31, 2012 11:21 AM
> To: Andrew Morton; Zhang, Rui; linux-kernel@vger.kernel.org
> Cc: Wu, Fengguang
> Subject: Re: [PATCH] thermal: solve compilation errors in rcar_thermal
> Importance: High
>
>
> Hi Zhang, Andrew
>
> This patch is needed on latest linus/master branch.
> Please re-check this patch.
>
> And, similar patch was added on linux-next/master branch
> b5da4e6d5603633835a1da267e0e699eea66f317
> (Thermal: Pass zone parameters as argument to tzd_register) but it
> seems wrong (?)
>
> At Tue, 21 Aug 2012 22:01:36 +0530,
> Devendra Naga wrote:
> >
> > following were the errors reported
> >
> > drivers/thermal/rcar_thermal.c: In function 'rcar_thermal_probe':
> > drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of
> > 'thermal_zone_device_register' makes integer from pointer without a
> > cast [enabled by default]
> > include/linux/thermal.h:166:29: note: expected 'int' but argument is
> of type 'struct rcar_thermal_priv *'
> > drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to
> function 'thermal_zone_device_register'
> > include/linux/thermal.h:166:29: note: declared here
> > make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
> > make: *** [drivers/thermal/rcar_thermal.o] Error 2
> >
> > with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
> >
> > Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> > ---
> > drivers/thermal/rcar_thermal.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/rcar_thermal.c
> > b/drivers/thermal/rcar_thermal.c index d445271..f7a1b57 100644
> > --- a/drivers/thermal/rcar_thermal.c
> > +++ b/drivers/thermal/rcar_thermal.c
> > @@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct
> platform_device *pdev)
> > goto error_free_priv;
> > }
> >
> > - zone = thermal_zone_device_register("rcar_thermal", 0, priv,
> > + zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> > &rcar_thermal_zone_ops, 0, 0);
> > if (IS_ERR(zone)) {
> > dev_err(&pdev->dev, "thermal zone device is NULL\n");
> > --
> > 1.7.9.5
> >
>
>
> Best regards
> ---
> Kuninori Morimoto
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] thermal: solve compilation errors in rcar_thermal
2012-10-31 6:24 ` Zhang, Rui
@ 2012-10-31 8:46 ` Kuninori Morimoto
2012-11-01 2:17 ` Zhang, Rui
0 siblings, 1 reply; 11+ messages in thread
From: Kuninori Morimoto @ 2012-10-31 8:46 UTC (permalink / raw)
To: Zhang, Rui; +Cc: Andrew Morton, linux-kernel, Wu, Fengguang, Devendra Naga
From: Devendra Naga <develkernel412222@gmail.com>
following were the errors reported
drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
include/linux/thermal.h:166:29: note: declared here
make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
make: *** [drivers/thermal/rcar_thermal.o] Error 2
with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---
Hi Zhang
This is original patch.
Please check Author's name after "git am"
drivers/thermal/rcar_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index d445271..f7a1b57 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
goto error_free_priv;
}
- zone = thermal_zone_device_register("rcar_thermal", 0, priv,
+ zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
&rcar_thermal_zone_ops, 0, 0);
if (IS_ERR(zone)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* RE: [PATCH] thermal: solve compilation errors in rcar_thermal
2012-10-31 8:46 ` Kuninori Morimoto
@ 2012-11-01 2:17 ` Zhang, Rui
0 siblings, 0 replies; 11+ messages in thread
From: Zhang, Rui @ 2012-11-01 2:17 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: Andrew Morton, linux-kernel, Wu, Fengguang, Devendra Naga
Hi, Andrew,
Can you take this patch?
It fixes a real build error, and IMO, we should merge it ASAP. Thanks.
> -----Original Message-----
> From: kuninori morimoto [mailto:kuninori.morimoto.gx@gmail.com] On
> Behalf Of Kuninori Morimoto
> Sent: Wednesday, October 31, 2012 4:46 PM
> To: Zhang, Rui
> Cc: Andrew Morton; linux-kernel@vger.kernel.org; Wu, Fengguang;
> Devendra Naga
> Subject: [PATCH] thermal: solve compilation errors in rcar_thermal
> Importance: High
>
> From: Devendra Naga <develkernel412222@gmail.com>
>
> following were the errors reported
>
> drivers/thermal/rcar_thermal.c: In function 'rcar_thermal_probe':
> drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of
> 'thermal_zone_device_register' makes integer from pointer without a
> cast [enabled by default]
> include/linux/thermal.h:166:29: note: expected 'int' but argument is of
> type 'struct rcar_thermal_priv *'
> drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to
> function 'thermal_zone_device_register'
> include/linux/thermal.h:166:29: note: declared here
> make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
> make: *** [drivers/thermal/rcar_thermal.o] Error 2
>
> with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Thanks,
rui
> ---
> Hi Zhang
>
> This is original patch.
> Please check Author's name after "git am"
>
> drivers/thermal/rcar_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/rcar_thermal.c
> b/drivers/thermal/rcar_thermal.c index d445271..f7a1b57 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct
> platform_device *pdev)
> goto error_free_priv;
> }
>
> - zone = thermal_zone_device_register("rcar_thermal", 0, priv,
> + zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> &rcar_thermal_zone_ops, 0, 0);
> if (IS_ERR(zone)) {
> dev_err(&pdev->dev, "thermal zone device is NULL\n");
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] thermal: solve compilation errors in rcar_thermal
2012-10-31 3:21 ` [PATCH] thermal: solve compilation errors in rcar_thermal Kuninori Morimoto
2012-10-31 6:24 ` Zhang, Rui
@ 2012-11-01 2:29 ` Fengguang Wu
1 sibling, 0 replies; 11+ messages in thread
From: Fengguang Wu @ 2012-11-01 2:29 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Andrew Morton, Zhang Rui, linux-kernel
On Tue, Oct 30, 2012 at 08:21:09PM -0700, Kuninori Morimoto wrote:
>
> Hi Zhang, Andrew
>
> This patch is needed on latest linus/master branch.
> Please re-check this patch.
Rui, it'd be better to send Andrew a finalized patch with your
Acked-by or Signed-off-by (because you passed it on), after resolving
the below puzzle:
> And, similar patch was added on linux-next/master branch
> b5da4e6d5603633835a1da267e0e699eea66f317
> (Thermal: Pass zone parameters as argument to tzd_register)
> but it seems wrong (?)
Thanks,
Fengguang
> At Tue, 21 Aug 2012 22:01:36 +0530,
> Devendra Naga wrote:
> >
> > following were the errors reported
> >
> > drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
> > drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
> > include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
> > drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
> > include/linux/thermal.h:166:29: note: declared here
> > make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
> > make: *** [drivers/thermal/rcar_thermal.o] Error 2
> >
> > with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
> >
> > Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> > ---
> > drivers/thermal/rcar_thermal.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> > index d445271..f7a1b57 100644
> > --- a/drivers/thermal/rcar_thermal.c
> > +++ b/drivers/thermal/rcar_thermal.c
> > @@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> > goto error_free_priv;
> > }
> >
> > - zone = thermal_zone_device_register("rcar_thermal", 0, priv,
> > + zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> > &rcar_thermal_zone_ops, 0, 0);
> > if (IS_ERR(zone)) {
> > dev_err(&pdev->dev, "thermal zone device is NULL\n");
> > --
> > 1.7.9.5
> >
>
>
> Best regards
> ---
> Kuninori Morimoto
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap()
2012-10-03 6:51 ` [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap() Kuninori Morimoto
@ 2012-11-07 3:32 ` Zhang Rui
0 siblings, 0 replies; 11+ messages in thread
From: Zhang Rui @ 2012-11-07 3:32 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Andrew Morton, Kuninori Morimoto, linux-kernel
On Tue, 2012-10-02 at 23:51 -0700, Kuninori Morimoto wrote:
> devm_kfree and devm_iounmap should not have to be explicitly used
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
applied to thermal-next.
thanks,
rui
> ---
> This patch is based on Devendra's
> [PATCH] thermal: solve compilation errors in rcar_thermal
>
> drivers/thermal/rcar_thermal.c | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 762f637..81dce23 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -185,7 +185,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> struct thermal_zone_device *zone;
> struct rcar_thermal_priv *priv;
> struct resource *res;
> - int ret;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!res) {
> @@ -206,16 +205,14 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> res->start, resource_size(res));
> if (!priv->base) {
> dev_err(&pdev->dev, "Unable to ioremap thermal register\n");
> - ret = -ENOMEM;
> - goto error_free_priv;
> + return -ENOMEM;
> }
>
> zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> &rcar_thermal_zone_ops, NULL, 0, 0);
> if (IS_ERR(zone)) {
> dev_err(&pdev->dev, "thermal zone device is NULL\n");
> - ret = PTR_ERR(zone);
> - goto error_iounmap;
> + return PTR_ERR(zone);
> }
>
> platform_set_drvdata(pdev, zone);
> @@ -223,26 +220,15 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> dev_info(&pdev->dev, "proved\n");
>
> return 0;
> -
> -error_iounmap:
> - devm_iounmap(&pdev->dev, priv->base);
> -error_free_priv:
> - devm_kfree(&pdev->dev, priv);
> -
> - return ret;
> }
>
> static int rcar_thermal_remove(struct platform_device *pdev)
> {
> struct thermal_zone_device *zone = platform_get_drvdata(pdev);
> - struct rcar_thermal_priv *priv = zone->devdata;
>
> thermal_zone_device_unregister(zone);
> platform_set_drvdata(pdev, NULL);
>
> - devm_iounmap(&pdev->dev, priv->base);
> - devm_kfree(&pdev->dev, priv);
> -
> return 0;
> }
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] thermal: rcar: fixup compilation errors
2012-10-09 8:14 ` [PATCH] thermal: rcar: fixup compilation errors Kuninori Morimoto
@ 2012-11-07 3:34 ` Zhang Rui
0 siblings, 0 replies; 11+ messages in thread
From: Zhang Rui @ 2012-11-07 3:34 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Andrew Morton, linux-kernel, Devendra Naga
On Tue, 2012-10-09 at 01:14 -0700, Kuninori Morimoto wrote:
> This patch fixup following error
>
> ${LINUX}/drivers/thermal/rcar_thermal.c: In function 'rcar_thermal_probe':
> ${LINUX}/drivers/thermal/rcar_thermal.c:214:9: warning: passing argument 3 \
> of 'thermal_zone_device_register' makes integer from pointer without\
> a cast [enabled by default]
> ${LINUX}/include/linux/thermal.h:215:29: note: expected 'int' but argument \
> is of type 'struct rcar_thermal_priv *'
> ${LINUX}/drivers/thermal/rcar_thermal.c:214:9:\
> error: too few arguments to function 'thermal_zone_device_register'
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
shipped in 3.7-rc4.
thanks,
rui
> ---
> for linus/master branch
>
> drivers/thermal/rcar_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index b13fe5d..762f637 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -210,7 +210,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> goto error_free_priv;
> }
>
> - zone = thermal_zone_device_register("rcar_thermal", 0, priv,
> + zone = thermal_zone_device_register("rcar_thermal", 0, 0, priv,
> &rcar_thermal_zone_ops, NULL, 0, 0);
> if (IS_ERR(zone)) {
> dev_err(&pdev->dev, "thermal zone device is NULL\n");
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-11-07 3:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21 16:31 [PATCH] thermal: solve compilation errors in rcar_thermal Devendra Naga
2012-08-28 1:05 ` Kuninori Morimoto
2012-10-03 6:51 ` [PATCH] thermal: rcar_thermal: remove explicitly used devm_kfree/iounap() Kuninori Morimoto
2012-11-07 3:32 ` Zhang Rui
2012-10-09 8:14 ` [PATCH] thermal: rcar: fixup compilation errors Kuninori Morimoto
2012-11-07 3:34 ` Zhang Rui
2012-10-31 3:21 ` [PATCH] thermal: solve compilation errors in rcar_thermal Kuninori Morimoto
2012-10-31 6:24 ` Zhang, Rui
2012-10-31 8:46 ` Kuninori Morimoto
2012-11-01 2:17 ` Zhang, Rui
2012-11-01 2:29 ` Fengguang Wu
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).