2019-09-16 10:53:03

by Lukasz Luba

[permalink] [raw]
Subject: [PATCH v2 1/3] memory: Exynos5422: minor fixes in DMC

Small fixes for issues captured by static analyzes:
used kfree() insead of devm_kfree() and missing 'static' in the private
function.
Checks which show the issues:
- drivers/memory/samsung/exynos5422-dmc.c:272 exynos5_init_freq_table()
warn: passing devm_ allocated variable to kfree. 'dmc->opp'
- drivers/memory/samsung/exynos5422-dmc.c:736:1: warning: symbol
'exynos5_dmc_align_init_freq' was not declared.

Reported-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Lukasz Luba <[email protected]>
---
drivers/memory/samsung/exynos5422-dmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 8c2ec29a7d57..a809fa997c03 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -269,7 +269,7 @@ static int exynos5_init_freq_table(struct exynos5_dmc *dmc,
return 0;

err_free_tables:
- kfree(dmc->opp);
+ devm_kfree(dmc->dev, dmc->opp);
err_opp:
dev_pm_opp_of_remove_table(dmc->dev);

@@ -732,7 +732,7 @@ static struct devfreq_dev_profile exynos5_dmc_df_profile = {
* statistics engine which supports only registered values. Thus, some alignment
* must be made.
*/
-unsigned long
+static unsigned long
exynos5_dmc_align_init_freq(struct exynos5_dmc *dmc,
unsigned long bootloader_init_freq)
{
--
2.17.1


2019-09-18 18:58:20

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] memory: Exynos5422: minor fixes in DMC

On Mon, Sep 16, 2019 at 12:07:02PM +0200, Lukasz Luba wrote:
> Small fixes for issues captured by static analyzes:
> used kfree() insead of devm_kfree() and missing 'static' in the private
> function.
> Checks which show the issues:
> - drivers/memory/samsung/exynos5422-dmc.c:272 exynos5_init_freq_table()
> warn: passing devm_ allocated variable to kfree. 'dmc->opp'
> - drivers/memory/samsung/exynos5422-dmc.c:736:1: warning: symbol
> 'exynos5_dmc_align_init_freq' was not declared.
>
> Reported-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Lukasz Luba <[email protected]>
> ---
> drivers/memory/samsung/exynos5422-dmc.c | 4 ++--

Thanks, applied.

Best regards,
Krzysztof