All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Jesse Taube <mr.bossman075@gmail.com>, linux-imx@nxp.com
Cc: robh+dt@kernel.org, mturquette@baylibre.com, shawnguo@kernel.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, aisheng.dong@nxp.com, stefan@agner.ch,
	linus.walleij@linaro.org, daniel.lezcano@linaro.org,
	tglx@linutronix.de, arnd@arndb.de, olof@lixom.net,
	soc@kernel.org, linux@armlinux.org.uk, abel.vesa@nxp.com,
	dev@lynxeye.de, marcel.ziswiler@toradex.com,
	tharvey@gateworks.com, leoyang.li@nxp.com,
	sebastian.reichel@collabora.com, cniedermaier@dh-electronics.com,
	clin@suse.com, giulio.benetti@benettiengineering.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v6 08/10] clk: imx: Add initial support for i.MXRT1170 clock driver
Date: Mon, 03 Oct 2022 12:29:07 -0700	[thread overview]
Message-ID: <20221003192908.E4FDFC433C1@smtp.kernel.org> (raw)
In-Reply-To: <663cdebe-755f-3a93-07f4-da662ccb5a43@gmail.com>

Quoting Jesse Taube (2022-10-01 09:15:38)
> On 9/30/22 16:28, Stephen Boyd wrote:
> > Quoting Jesse Taube (2022-09-01 11:33:41)
> >> +
> >> +       anp = of_find_compatible_node(NULL, NULL, "fsl,imxrt-anatop");
> >> +       pll_base = of_iomap(anp, 0);
> >> +       of_node_put(anp);
> >> +       if (WARN_ON(!pll_base))
> >> +               return -ENOMEM;
> > 
> > The kzalloc() leaked.
> LOL `grep -r of_find_compatible_node drivers/clk/imx`...
> Shall I send patches for the rest of IMX.
> 

Sure? Introducing more things to cleanup isn't useful, that's all. If
you have other things to do then don't worry about it.

> >> +
> >> +       imx_check_clk_hws(hws, IMXRT1170_CLK_END);
> >> +
> >> +       ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
> > 
> > Use devm? Or implement a driver remove function?
> Uh this is the same in the rest of imx could you explain a bit more?
> 

Use devm_of_clk_add_hw_provider() so that the provider is removed on
driver unbind.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@kernel.org>
To: Jesse Taube <mr.bossman075@gmail.com>, linux-imx@nxp.com
Cc: robh+dt@kernel.org, mturquette@baylibre.com, shawnguo@kernel.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, aisheng.dong@nxp.com, stefan@agner.ch,
	linus.walleij@linaro.org, daniel.lezcano@linaro.org,
	tglx@linutronix.de, arnd@arndb.de, olof@lixom.net,
	soc@kernel.org, linux@armlinux.org.uk, abel.vesa@nxp.com,
	dev@lynxeye.de, marcel.ziswiler@toradex.com,
	tharvey@gateworks.com, leoyang.li@nxp.com,
	sebastian.reichel@collabora.com, cniedermaier@dh-electronics.com,
	clin@suse.com, giulio.benetti@benettiengineering.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v6 08/10] clk: imx: Add initial support for i.MXRT1170 clock driver
Date: Mon, 03 Oct 2022 12:29:07 -0700	[thread overview]
Message-ID: <20221003192908.E4FDFC433C1@smtp.kernel.org> (raw)
In-Reply-To: <663cdebe-755f-3a93-07f4-da662ccb5a43@gmail.com>

Quoting Jesse Taube (2022-10-01 09:15:38)
> On 9/30/22 16:28, Stephen Boyd wrote:
> > Quoting Jesse Taube (2022-09-01 11:33:41)
> >> +
> >> +       anp = of_find_compatible_node(NULL, NULL, "fsl,imxrt-anatop");
> >> +       pll_base = of_iomap(anp, 0);
> >> +       of_node_put(anp);
> >> +       if (WARN_ON(!pll_base))
> >> +               return -ENOMEM;
> > 
> > The kzalloc() leaked.
> LOL `grep -r of_find_compatible_node drivers/clk/imx`...
> Shall I send patches for the rest of IMX.
> 

Sure? Introducing more things to cleanup isn't useful, that's all. If
you have other things to do then don't worry about it.

> >> +
> >> +       imx_check_clk_hws(hws, IMXRT1170_CLK_END);
> >> +
> >> +       ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
> > 
> > Use devm? Or implement a driver remove function?
> Uh this is the same in the rest of imx could you explain a bit more?
> 

Use devm_of_clk_add_hw_provider() so that the provider is removed on
driver unbind.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-10-03 19:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 18:33 [PATCH v6 00/10] Add support for i.MXRT1170-evk Jesse Taube
2022-09-01 18:33 ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 01/10] dt-bindings: arm: imx: Add i.MXRT compatible Documentation Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 02/10] dt-bindings: timer: gpt: " Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 03/10] dt-bindings: mmc: fsl-imx-esdhc: add i.MXRT1170 compatible Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 04/10] dt-bindings: serial: fsl-lpuart: " Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 05/10] ARM: mach-imx: Add support for i.MXRT1170 Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 06/10] clk: imx: Update pllv3 to support i.MXRT1170 Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-02  4:58   ` kernel test robot
2022-09-01 18:33 ` [PATCH v6 07/10] dt-bindings: imx: Add clock binding for i.MXRT1170 Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 08/10] clk: imx: Add initial support for i.MXRT1170 clock driver Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-30 20:28   ` Stephen Boyd
2022-09-30 20:28     ` Stephen Boyd
2022-10-01 16:15     ` Jesse Taube
2022-10-01 16:15       ` Jesse Taube
2022-10-03 19:29       ` Stephen Boyd [this message]
2022-10-03 19:29         ` Stephen Boyd
2022-09-01 18:33 ` [PATCH v6 09/10] ARM: dts: imx: Add i.MXRT1170-EVK support Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-01 18:33 ` [PATCH v6 10/10] ARM: imxrt_defconfig: Add i.MXRT1170 Jesse Taube
2022-09-01 18:33   ` Jesse Taube
2022-09-02  8:06 ` [PATCH v6 00/10] Add support for i.MXRT1170-evk Linus Walleij
2022-09-02  8:06   ` Linus Walleij
2022-09-02 12:56   ` Jesse Taube
2022-09-02 12:56     ` Jesse Taube
2022-09-02 13:26     ` Linus Walleij
2022-09-02 13:26       ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221003192908.E4FDFC433C1@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=arnd@arndb.de \
    --cc=clin@suse.com \
    --cc=cniedermaier@dh-electronics.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dev@lynxeye.de \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=kernel@pengutronix.de \
    --cc=leoyang.li@nxp.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marcel.ziswiler@toradex.com \
    --cc=mr.bossman075@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastian.reichel@collabora.com \
    --cc=shawnguo@kernel.org \
    --cc=soc@kernel.org \
    --cc=stefan@agner.ch \
    --cc=tglx@linutronix.de \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.