* [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init
@ 2016-05-08 9:24 Krzysztof Kozlowski
2016-05-09 13:32 ` Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2016-05-08 9:24 UTC (permalink / raw)
To: Sylwester Nawrocki, Tomasz Figa, Michael Turquette, Stephen Boyd,
Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, linux-clk,
linux-arm-kernel, linux-kernel
Cc: Krzysztof Kozlowski
The samsung_clk_init() cannot return NULL. Either it returns allocated
memory or it panics.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/clk/samsung/clk-exynos5420.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 92382cef9f90..770c0f007c6b 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np,
exynos5x_soc = soc;
ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
- if (!ctx)
- panic("%s: unable to allocate context.\n", __func__);
samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks,
ARRAY_SIZE(exynos5x_fixed_rate_ext_clks),
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init
2016-05-08 9:24 [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init Krzysztof Kozlowski
@ 2016-05-09 13:32 ` Javier Martinez Canillas
2016-05-09 17:30 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2016-05-09 13:32 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, Kukjin Kim, Krzysztof Kozlowski,
linux-samsung-soc, linux-clk, linux-arm-kernel, linux-kernel
Hello Krzysztof,
On 05/08/2016 05:24 AM, Krzysztof Kozlowski wrote:
> The samsung_clk_init() cannot return NULL. Either it returns allocated
> memory or it panics.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/clk/samsung/clk-exynos5420.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index 92382cef9f90..770c0f007c6b 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np,
> exynos5x_soc = soc;
>
> ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
> - if (!ctx)
> - panic("%s: unable to allocate context.\n", __func__);
>
Indeed, the check is superfluous. I see that most callers [0] currently
do the same, so probably makes sense to remove those too in this patch.
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
[0]:
drivers/clk/samsung/clk-exynos4.c
drivers/clk/samsung/clk-exynos5250.c
drivers/clk/samsung/clk-exynos5440.c
drivers/clk/samsung/clk-s3c2410.c
drivers/clk/samsung/clk-s3c2412.c
drivers/clk/samsung/clk-s3c2443.c
drivers/clk/samsung/clk-s3c64xx.c
drivers/clk/samsung/clk-s5pv210.c
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init
2016-05-09 13:32 ` Javier Martinez Canillas
@ 2016-05-09 17:30 ` Krzysztof Kozlowski
0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2016-05-09 17:30 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
Michael Turquette, Stephen Boyd, Kukjin Kim, Krzysztof Kozlowski,
linux-samsung-soc, linux-clk, linux-arm-kernel, linux-kernel
On Mon, May 09, 2016 at 09:32:47AM -0400, Javier Martinez Canillas wrote:
> Hello Krzysztof,
>
> On 05/08/2016 05:24 AM, Krzysztof Kozlowski wrote:
> > The samsung_clk_init() cannot return NULL. Either it returns allocated
> > memory or it panics.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> > drivers/clk/samsung/clk-exynos5420.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> > index 92382cef9f90..770c0f007c6b 100644
> > --- a/drivers/clk/samsung/clk-exynos5420.c
> > +++ b/drivers/clk/samsung/clk-exynos5420.c
> > @@ -1356,8 +1356,6 @@ static void __init exynos5x_clk_init(struct device_node *np,
> > exynos5x_soc = soc;
> >
> > ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS);
> > - if (!ctx)
> > - panic("%s: unable to allocate context.\n", __func__);
> >
>
> Indeed, the check is superfluous. I see that most callers [0] currently
> do the same, so probably makes sense to remove those too in this patch.
>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Thanks, I'll change this everywhere.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-09 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-08 9:24 [PATCH] clk: samsung: exynos5420: Remove useless check for return value of samsung_clk_init Krzysztof Kozlowski
2016-05-09 13:32 ` Javier Martinez Canillas
2016-05-09 17:30 ` Krzysztof Kozlowski
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).