* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-22 16:08 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-08-22 16:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/clk/meson/gxbb-aoclk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
index 61ef28a..b45c5fb 100644
--- a/drivers/clk/meson/gxbb-aoclk.c
+++ b/drivers/clk/meson/gxbb-aoclk.c
@@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct gxbb_aoclk_reset_controller *rstc;
- rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
+ rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
if (!rstc)
return -ENOMEM;
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-22 16:08 ` Wei Yongjun
0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2016-08-22 16:08 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Carlo Caione, Kevin Hilman,
Neil Armstrong
Cc: Wei Yongjun, linux-clk, linux-arm-kernel, linux-amlogic
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/clk/meson/gxbb-aoclk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
index 61ef28a..b45c5fb 100644
--- a/drivers/clk/meson/gxbb-aoclk.c
+++ b/drivers/clk/meson/gxbb-aoclk.c
@@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct gxbb_aoclk_reset_controller *rstc;
- rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
+ rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
if (!rstc)
return -ENOMEM;
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
2016-08-22 16:08 ` Wei Yongjun
(?)
@ 2016-08-23 7:58 ` Neil Armstrong
-1 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-08-23 7:58 UTC (permalink / raw)
To: linus-amlogic
On 08/22/2016 06:08 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/clk/meson/gxbb-aoclk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
> index 61ef28a..b45c5fb 100644
> --- a/drivers/clk/meson/gxbb-aoclk.c
> +++ b/drivers/clk/meson/gxbb-aoclk.c
> @@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct gxbb_aoclk_reset_controller *rstc;
>
> - rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
> + rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
> if (!rstc)
> return -ENOMEM;
>
>
>
>
Aww, my bad.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Also :
Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-23 7:58 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-08-23 7:58 UTC (permalink / raw)
To: linux-arm-kernel
On 08/22/2016 06:08 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/clk/meson/gxbb-aoclk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
> index 61ef28a..b45c5fb 100644
> --- a/drivers/clk/meson/gxbb-aoclk.c
> +++ b/drivers/clk/meson/gxbb-aoclk.c
> @@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct gxbb_aoclk_reset_controller *rstc;
>
> - rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
> + rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
> if (!rstc)
> return -ENOMEM;
>
>
>
>
Aww, my bad.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Also :
Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-23 7:58 ` Neil Armstrong
0 siblings, 0 replies; 9+ messages in thread
From: Neil Armstrong @ 2016-08-23 7:58 UTC (permalink / raw)
To: Wei Yongjun, Michael Turquette, Stephen Boyd, Carlo Caione,
Kevin Hilman
Cc: Wei Yongjun, linux-clk, linux-arm-kernel, linux-amlogic
On 08/22/2016 06:08 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/clk/meson/gxbb-aoclk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c
> index 61ef28a..b45c5fb 100644
> --- a/drivers/clk/meson/gxbb-aoclk.c
> +++ b/drivers/clk/meson/gxbb-aoclk.c
> @@ -142,7 +142,7 @@ static int gxbb_aoclkc_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct gxbb_aoclk_reset_controller *rstc;
>
> - rstc = devm_kzalloc(dev, sizeof(rstc), GFP_KERNEL);
> + rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL);
> if (!rstc)
> return -ENOMEM;
>
>
>
>
Aww, my bad.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Also :
Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver")
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
2016-08-22 16:08 ` Wei Yongjun
(?)
@ 2016-08-24 17:29 ` Stephen Boyd
-1 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-24 17:29 UTC (permalink / raw)
To: linus-amlogic
On 08/22, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-24 17:29 ` Stephen Boyd
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-24 17:29 UTC (permalink / raw)
To: linux-arm-kernel
On 08/22, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH -next] clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
@ 2016-08-24 17:29 ` Stephen Boyd
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2016-08-24 17:29 UTC (permalink / raw)
To: Wei Yongjun
Cc: Michael Turquette, Carlo Caione, Kevin Hilman, Neil Armstrong,
Wei Yongjun, linux-clk, linux-arm-kernel, linux-amlogic
On 08/22, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> sizeof() when applied to a pointer typed expression gives the
> size of the pointer, not that of the pointed data.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread