Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-29 Thread Vaishali Thakkar
On Wed, Jul 29, 2015 at 2:00 PM, Linus Walleij  wrote:
> On Tue, Jul 28, 2015 at 4:17 PM, Vaishali Thakkar
>  wrote:
>> On 28 Jul 2015 17:35, "Linus Walleij"  wrote:
>
>>> Reviewed-by: Linus Walleij 
>>> Please get this through ARM SoC or tell me if I should handle it.
>>
>> So, do you want me to send this in ARM SoC mailing list?
>
> linux-arm-ker...@lists.infradead.org is preferred, if you want
> the ARM SoC maintainers to apply the patch directly not
> that it has my Review tag, send it to a...@vger.kernel.org
> and ask them to apply it.

Ok. I will send this to  linux-arm-ker...@lists.infradead.org
with your Review tag.

>>> Likely. There are sloppy errors everywhere.
>>
>> Can I go for handling them?? I am not sure how much important this driver
>> is.
>
> Yes, and it's kind of important-ish since people look at
> reference designs when doing other board support and the
> realviews are also supported in QEMU making them kind
> of popular.

I see. Then I'll go for it.

Thank You.

> Yours,
> Linus Walleij



-- 
Vaishali
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-29 Thread Linus Walleij
On Tue, Jul 28, 2015 at 4:17 PM, Vaishali Thakkar
 wrote:
> On 28 Jul 2015 17:35, "Linus Walleij"  wrote:

>> Reviewed-by: Linus Walleij 
>> Please get this through ARM SoC or tell me if I should handle it.
>
> So, do you want me to send this in ARM SoC mailing list?

linux-arm-ker...@lists.infradead.org is preferred, if you want
the ARM SoC maintainers to apply the patch directly not
that it has my Review tag, send it to a...@vger.kernel.org
and ask them to apply it.

>> Likely. There are sloppy errors everywhere.
>
> Can I go for handling them?? I am not sure how much important this driver
> is.

Yes, and it's kind of important-ish since people look at
reference designs when doing other board support and the
realviews are also supported in QEMU making them kind
of popular.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-29 Thread Vaishali Thakkar
On Wed, Jul 29, 2015 at 2:00 PM, Linus Walleij linus.wall...@linaro.org wrote:
 On Tue, Jul 28, 2015 at 4:17 PM, Vaishali Thakkar
 vthakkar1...@gmail.com wrote:
 On 28 Jul 2015 17:35, Linus Walleij linus.wall...@linaro.org wrote:

 Reviewed-by: Linus Walleij linus.wall...@linaro.org
 Please get this through ARM SoC or tell me if I should handle it.

 So, do you want me to send this in ARM SoC mailing list?

 linux-arm-ker...@lists.infradead.org is preferred, if you want
 the ARM SoC maintainers to apply the patch directly not
 that it has my Review tag, send it to a...@vger.kernel.org
 and ask them to apply it.

Ok. I will send this to  linux-arm-ker...@lists.infradead.org
with your Review tag.

 Likely. There are sloppy errors everywhere.

 Can I go for handling them?? I am not sure how much important this driver
 is.

 Yes, and it's kind of important-ish since people look at
 reference designs when doing other board support and the
 realviews are also supported in QEMU making them kind
 of popular.

I see. Then I'll go for it.

Thank You.

 Yours,
 Linus Walleij



-- 
Vaishali
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-29 Thread Linus Walleij
On Tue, Jul 28, 2015 at 4:17 PM, Vaishali Thakkar
vthakkar1...@gmail.com wrote:
 On 28 Jul 2015 17:35, Linus Walleij linus.wall...@linaro.org wrote:

 Reviewed-by: Linus Walleij linus.wall...@linaro.org
 Please get this through ARM SoC or tell me if I should handle it.

 So, do you want me to send this in ARM SoC mailing list?

linux-arm-ker...@lists.infradead.org is preferred, if you want
the ARM SoC maintainers to apply the patch directly not
that it has my Review tag, send it to a...@vger.kernel.org
and ask them to apply it.

 Likely. There are sloppy errors everywhere.

 Can I go for handling them?? I am not sure how much important this driver
 is.

Yes, and it's kind of important-ish since people look at
reference designs when doing other board support and the
realviews are also supported in QEMU making them kind
of popular.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-28 Thread Linus Walleij
On Mon, Jul 27, 2015 at 5:23 AM, Vaishali Thakkar
 wrote:

> This patch introduces the use of devm_kzalloc and does away
> with kfree in the probe function.
>
> Signed-off-by: Vaishali Thakkar 

Reviewed-by: Linus Walleij 
Please get this through ARM SoC or tell me if I should handle it.

> Some comments on this patch and driver:
> - Here, after this change there will be a kfree on the failure of
>   the regmap_read too. I am not sure if driver is currently missing
>   it or there is something else happening here. Also, I think there
>   should be soc_device_unregister under the regmap_read.

Likely. There are sloppy errors everywhere.

> - Moreover, get_maintainer.pl is not pointing me towards any particular
>   mailing list or maintainers. So, I am sending this patch to all
>   commiters as there are only three commits for this driver.

This is my code, also my stupid bugs :/

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] soc: versatile: Use devm_kzalloc

2015-07-28 Thread Linus Walleij
On Mon, Jul 27, 2015 at 5:23 AM, Vaishali Thakkar
vthakkar1...@gmail.com wrote:

 This patch introduces the use of devm_kzalloc and does away
 with kfree in the probe function.

 Signed-off-by: Vaishali Thakkar vthakkar1...@gmail.com

Reviewed-by: Linus Walleij linus.wall...@linaro.org
Please get this through ARM SoC or tell me if I should handle it.

 Some comments on this patch and driver:
 - Here, after this change there will be a kfree on the failure of
   the regmap_read too. I am not sure if driver is currently missing
   it or there is something else happening here. Also, I think there
   should be soc_device_unregister under the regmap_read.

Likely. There are sloppy errors everywhere.

 - Moreover, get_maintainer.pl is not pointing me towards any particular
   mailing list or maintainers. So, I am sending this patch to all
   commiters as there are only three commits for this driver.

This is my code, also my stupid bugs :/

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] soc: versatile: Use devm_kzalloc

2015-07-26 Thread Vaishali Thakkar
This patch introduces the use of devm_kzalloc and does away
with kfree in the probe function.

Signed-off-by: Vaishali Thakkar 
---
Some comments on this patch and driver:
- Here, after this change there will be a kfree on the failure of
  the regmap_read too. I am not sure if driver is currently missing
  it or there is something else happening here. Also, I think there
  should be soc_device_unregister under the regmap_read.
- Moreover, get_maintainer.pl is not pointing me towards any particular
  mailing list or maintainers. So, I am sending this patch to all
  commiters as there are only three commits for this driver.
---
 drivers/soc/versatile/soc-realview.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/versatile/soc-realview.c 
b/drivers/soc/versatile/soc-realview.c
index e642c45..0889710 100644
--- a/drivers/soc/versatile/soc-realview.c
+++ b/drivers/soc/versatile/soc-realview.c
@@ -103,7 +103,8 @@ static int realview_soc_probe(struct platform_device *pdev)
if (IS_ERR(syscon_regmap))
return PTR_ERR(syscon_regmap);
 
-   soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
+   soc_dev_attr = devm_kzalloc(>dev, sizeof(*soc_dev_attr),
+   GFP_KERNEL);
if (!soc_dev_attr)
return -ENOMEM;
 
@@ -115,10 +116,9 @@ static int realview_soc_probe(struct platform_device *pdev)
soc_dev_attr->machine = "RealView";
soc_dev_attr->family = "Versatile";
soc_dev = soc_device_register(soc_dev_attr);
-   if (IS_ERR(soc_dev)) {
-   kfree(soc_dev_attr);
+   if (IS_ERR(soc_dev))
return -ENODEV;
-   }
+
ret = regmap_read(syscon_regmap, REALVIEW_SYS_ID_OFFSET,
  _coreid);
if (ret)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] soc: versatile: Use devm_kzalloc

2015-07-26 Thread Vaishali Thakkar
This patch introduces the use of devm_kzalloc and does away
with kfree in the probe function.

Signed-off-by: Vaishali Thakkar vthakkar1...@gmail.com
---
Some comments on this patch and driver:
- Here, after this change there will be a kfree on the failure of
  the regmap_read too. I am not sure if driver is currently missing
  it or there is something else happening here. Also, I think there
  should be soc_device_unregister under the regmap_read.
- Moreover, get_maintainer.pl is not pointing me towards any particular
  mailing list or maintainers. So, I am sending this patch to all
  commiters as there are only three commits for this driver.
---
 drivers/soc/versatile/soc-realview.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/versatile/soc-realview.c 
b/drivers/soc/versatile/soc-realview.c
index e642c45..0889710 100644
--- a/drivers/soc/versatile/soc-realview.c
+++ b/drivers/soc/versatile/soc-realview.c
@@ -103,7 +103,8 @@ static int realview_soc_probe(struct platform_device *pdev)
if (IS_ERR(syscon_regmap))
return PTR_ERR(syscon_regmap);
 
-   soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
+   soc_dev_attr = devm_kzalloc(pdev-dev, sizeof(*soc_dev_attr),
+   GFP_KERNEL);
if (!soc_dev_attr)
return -ENOMEM;
 
@@ -115,10 +116,9 @@ static int realview_soc_probe(struct platform_device *pdev)
soc_dev_attr-machine = RealView;
soc_dev_attr-family = Versatile;
soc_dev = soc_device_register(soc_dev_attr);
-   if (IS_ERR(soc_dev)) {
-   kfree(soc_dev_attr);
+   if (IS_ERR(soc_dev))
return -ENODEV;
-   }
+
ret = regmap_read(syscon_regmap, REALVIEW_SYS_ID_OFFSET,
  realview_coreid);
if (ret)
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/