mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to platform device probing (fwd)
@ 2018-07-18 14:53 Julia Lawall
  2018-07-18 14:57 ` Matthias Brugger
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2018-07-18 14:53 UTC (permalink / raw)
  To: matthias.bgg
  Cc: ulrich.hecht+renesas, laurent.pinchart, ck.hu, p.zabel, airlied,
	robh+dt, mark.rutland, mturquette, sboyd, lee.jones, davem,
	gregkh, mchehab, rdunlap, pi-cheng.chen, sean.wang, linux-clk,
	linux, matthias.bgg, dri-devel, linux-kernel, linux-arm-kernel,
	linux-mediatek, Matthias Brugger, kbuild-all

Hello,

Please check on whether the kfree in the remove function is still needed.
Also the platform_driver structure has two probe fields.

julia

---------- Forwarded message ----------
Date: Wed, 18 Jul 2018 22:31:13 +0800
From: kbuild test robot <lkp@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to
    platform device probing

In-Reply-To: <20180717220328.792-4-matthias.bgg@kernel.org>
References: <20180717220328.792-4-matthias.bgg@kernel.org>
TO: matthias.bgg@kernel.org

Hi Matthias,

I love your patch! Perhaps something to improve:

[auto build test WARNING on sof-driver-fuweitax/master]
[also build test WARNING on v4.18-rc5 next-20180718]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/arm-arm64-mediatek-Fix-mmsys-device-probing/20180718-191916
base:   https://github.com/fuweitax/linux master
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

>> drivers/clk/mediatek/clk-mt8173.c:1195:1-6: WARNING: invalid free of devm_ allocated data
--
>> drivers/clk/mediatek/clk-mt8173.c:1200:48-49: probe: first occurrence line 1201, second occurrence line 1202

# https://github.com/0day-ci/linux/commit/112857d0f58413a87875dfc9e1b43fdfde3b55eb
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 112857d0f58413a87875dfc9e1b43fdfde3b55eb
vim +1195 drivers/clk/mediatek/clk-mt8173.c

112857d0 Matthias Brugger 2018-07-18  1189
112857d0 Matthias Brugger 2018-07-18  1190  static int mtk_mmsys_remove(struct platform_device *pdev)
112857d0 Matthias Brugger 2018-07-18  1191  {
112857d0 Matthias Brugger 2018-07-18  1192  	struct mtk_mmsys_priv *private = platform_get_drvdata(pdev);
112857d0 Matthias Brugger 2018-07-18  1193
112857d0 Matthias Brugger 2018-07-18  1194  	kfree(private->clk_data);
112857d0 Matthias Brugger 2018-07-18 @1195  	kfree(private);
112857d0 Matthias Brugger 2018-07-18  1196
112857d0 Matthias Brugger 2018-07-18  1197  	return 0;
29859d93 James Liao       2015-05-20  1198  }
112857d0 Matthias Brugger 2018-07-18  1199
112857d0 Matthias Brugger 2018-07-18 @1200  static struct platform_driver clk_mt8173_mm_drv = {
112857d0 Matthias Brugger 2018-07-18 @1201  	.probe = mtk_mmsys_probe,
112857d0 Matthias Brugger 2018-07-18 @1202  	.probe = mtk_mmsys_remove,
112857d0 Matthias Brugger 2018-07-18  1203  	.driver = {
112857d0 Matthias Brugger 2018-07-18  1204  		.name = "clk-mt8173-mm",
112857d0 Matthias Brugger 2018-07-18  1205  	},
112857d0 Matthias Brugger 2018-07-18  1206  };
112857d0 Matthias Brugger 2018-07-18  1207  module_platform_driver(clk_mt8173_mm_drv);
29859d93 James Liao       2015-05-20  1208

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to platform device probing (fwd)
  2018-07-18 14:53 [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to platform device probing (fwd) Julia Lawall
@ 2018-07-18 14:57 ` Matthias Brugger
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2018-07-18 14:57 UTC (permalink / raw)
  To: Julia Lawall, matthias.bgg
  Cc: ulrich.hecht+renesas, laurent.pinchart, ck.hu, p.zabel, airlied,
	robh+dt, mark.rutland, mturquette, sboyd, lee.jones, davem,
	gregkh, mchehab, rdunlap, pi-cheng.chen, sean.wang, linux-clk,
	linux, dri-devel, linux-kernel, linux-arm-kernel, linux-mediatek,
	Matthias Brugger, kbuild-all



On 18/07/18 16:53, Julia Lawall wrote:
> Hello,
> 
> Please check on whether the kfree in the remove function is still needed.
> Also the platform_driver structure has two probe fields.

Fair enough, kfree(private) is not needed, because it is allocated with
devm_kzalloc.

I'll fix both errors. Thanks for noting.
Matthias

> 
> julia
> 
> ---------- Forwarded message ----------
> Date: Wed, 18 Jul 2018 22:31:13 +0800
> From: kbuild test robot <lkp@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Subject: Re: [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to
>     platform device probing
> 
> In-Reply-To: <20180717220328.792-4-matthias.bgg@kernel.org>
> References: <20180717220328.792-4-matthias.bgg@kernel.org>
> TO: matthias.bgg@kernel.org
> 
> Hi Matthias,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on sof-driver-fuweitax/master]
> [also build test WARNING on v4.18-rc5 next-20180718]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/arm-arm64-mediatek-Fix-mmsys-device-probing/20180718-191916
> base:   https://github.com/fuweitax/linux master
> :::::: branch date: 3 hours ago
> :::::: commit date: 3 hours ago
> 
>>> drivers/clk/mediatek/clk-mt8173.c:1195:1-6: WARNING: invalid free of devm_ allocated data
> --
>>> drivers/clk/mediatek/clk-mt8173.c:1200:48-49: probe: first occurrence line 1201, second occurrence line 1202
> 
> # https://github.com/0day-ci/linux/commit/112857d0f58413a87875dfc9e1b43fdfde3b55eb
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 112857d0f58413a87875dfc9e1b43fdfde3b55eb
> vim +1195 drivers/clk/mediatek/clk-mt8173.c
> 
> 112857d0 Matthias Brugger 2018-07-18  1189
> 112857d0 Matthias Brugger 2018-07-18  1190  static int mtk_mmsys_remove(struct platform_device *pdev)
> 112857d0 Matthias Brugger 2018-07-18  1191  {
> 112857d0 Matthias Brugger 2018-07-18  1192  	struct mtk_mmsys_priv *private = platform_get_drvdata(pdev);
> 112857d0 Matthias Brugger 2018-07-18  1193
> 112857d0 Matthias Brugger 2018-07-18  1194  	kfree(private->clk_data);
> 112857d0 Matthias Brugger 2018-07-18 @1195  	kfree(private);
> 112857d0 Matthias Brugger 2018-07-18  1196
> 112857d0 Matthias Brugger 2018-07-18  1197  	return 0;
> 29859d93 James Liao       2015-05-20  1198  }
> 112857d0 Matthias Brugger 2018-07-18  1199
> 112857d0 Matthias Brugger 2018-07-18 @1200  static struct platform_driver clk_mt8173_mm_drv = {
> 112857d0 Matthias Brugger 2018-07-18 @1201  	.probe = mtk_mmsys_probe,
> 112857d0 Matthias Brugger 2018-07-18 @1202  	.probe = mtk_mmsys_remove,
> 112857d0 Matthias Brugger 2018-07-18  1203  	.driver = {
> 112857d0 Matthias Brugger 2018-07-18  1204  		.name = "clk-mt8173-mm",
> 112857d0 Matthias Brugger 2018-07-18  1205  	},
> 112857d0 Matthias Brugger 2018-07-18  1206  };
> 112857d0 Matthias Brugger 2018-07-18  1207  module_platform_driver(clk_mt8173_mm_drv);
> 29859d93 James Liao       2015-05-20  1208
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-18 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 14:53 [resend PATCH v4 3/5] clk: mediatek: mt8173: switch mmsys to platform device probing (fwd) Julia Lawall
2018-07-18 14:57 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®