From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 01/19] clk: composite: Add unregister function
Date: Tue, 19 Apr 2016 11:52:50 +0200 [thread overview]
Message-ID: <20160419095250.GA26050@lukather> (raw)
In-Reply-To: <20160415222856.GQ14441@codeaurora.org>
Hi,
On Fri, Apr 15, 2016 at 03:28:56PM -0700, Stephen Boyd wrote:
> On 03/23, Maxime Ripard wrote:
> > The composite clock didn't have any unregistration function, which forced
> > us to use clk_unregister directly on it.
> >
> > While it was already not great from an API point of view, it also meant
> > that we were leaking the clk_composite structure allocated in
> > clk_register_composite.
> >
> > Add a clk_unregister_composite function to fix this.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
>
> I'm currently attempting to change the way clks are registered so
> that we don't return clk pointers from clk_register and have
> users add OF clk providers that return clk_hw pointers instead of
> clk pointers. Just a note, that this whole thing should be
> deleted in the next cycle if I can convert everything!
Ok.
>
> > drivers/clk/clk-composite.c | 15 +++++++++++++++
> > include/linux/clk-provider.h | 1 +
> > 2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> > index 1f903e1f86a2..b0f3b84ebd13 100644
> > --- a/drivers/clk/clk-composite.c
> > +++ b/drivers/clk/clk-composite.c
> > @@ -286,3 +286,18 @@ err:
> > kfree(composite);
> > return clk;
> > }
> > +
> > +void clk_unregister_composite(struct clk *clk)
> > +{
> > + struct clk_composite *composite;
> > + struct clk_hw *hw;
> > +
> > + hw = __clk_get_hw(clk);
> > + if (!hw)
> > + return;
> > +
> > + composite = to_clk_composite(hw);
> > +
> > + clk_unregister(clk);
> > + kfree(composite);
> > +}
>
> EXPORT_SYMBOL_GPL?
The register function is not registered, so I don't think that's
necessary.
> Do I need to pick this up?
I have a bunch of other clock patches that need this, so I guess it
would be easier if applied it directly with your acked-by, or if you
could apply it and give a stable branch I can base my future PR on.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160419/851f3306/attachment-0001.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Mike Turquette
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Alexander Kaplan <alex-MflLfwwFzuz+yO7R74ARew@public.gmane.org>,
Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Thomas Petazzoni
<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v3 01/19] clk: composite: Add unregister function
Date: Tue, 19 Apr 2016 11:52:50 +0200 [thread overview]
Message-ID: <20160419095250.GA26050@lukather> (raw)
In-Reply-To: <20160415222856.GQ14441-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]
Hi,
On Fri, Apr 15, 2016 at 03:28:56PM -0700, Stephen Boyd wrote:
> On 03/23, Maxime Ripard wrote:
> > The composite clock didn't have any unregistration function, which forced
> > us to use clk_unregister directly on it.
> >
> > While it was already not great from an API point of view, it also meant
> > that we were leaking the clk_composite structure allocated in
> > clk_register_composite.
> >
> > Add a clk_unregister_composite function to fix this.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> > ---
>
> I'm currently attempting to change the way clks are registered so
> that we don't return clk pointers from clk_register and have
> users add OF clk providers that return clk_hw pointers instead of
> clk pointers. Just a note, that this whole thing should be
> deleted in the next cycle if I can convert everything!
Ok.
>
> > drivers/clk/clk-composite.c | 15 +++++++++++++++
> > include/linux/clk-provider.h | 1 +
> > 2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> > index 1f903e1f86a2..b0f3b84ebd13 100644
> > --- a/drivers/clk/clk-composite.c
> > +++ b/drivers/clk/clk-composite.c
> > @@ -286,3 +286,18 @@ err:
> > kfree(composite);
> > return clk;
> > }
> > +
> > +void clk_unregister_composite(struct clk *clk)
> > +{
> > + struct clk_composite *composite;
> > + struct clk_hw *hw;
> > +
> > + hw = __clk_get_hw(clk);
> > + if (!hw)
> > + return;
> > +
> > + composite = to_clk_composite(hw);
> > +
> > + clk_unregister(clk);
> > + kfree(composite);
> > +}
>
> EXPORT_SYMBOL_GPL?
The register function is not registered, so I don't think that's
necessary.
> Do I need to pick this up?
I have a bunch of other clock patches that need this, so I guess it
would be easier if applied it directly with your acked-by, or if you
could apply it and give a stable branch I can base my future PR on.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@baylibre.com>,
David Airlie <airlied@linux.ie>,
Thierry Reding <thierry.reding@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Daniel Vetter <daniel@ffwll.ch>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-sunxi@googlegroups.com,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans de Goede <hdegoede@redhat.com>,
Alexander Kaplan <alex@nextthing.co>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Rob Clark <robdclark@gmail.com>
Subject: Re: [PATCH v3 01/19] clk: composite: Add unregister function
Date: Tue, 19 Apr 2016 11:52:50 +0200 [thread overview]
Message-ID: <20160419095250.GA26050@lukather> (raw)
In-Reply-To: <20160415222856.GQ14441@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]
Hi,
On Fri, Apr 15, 2016 at 03:28:56PM -0700, Stephen Boyd wrote:
> On 03/23, Maxime Ripard wrote:
> > The composite clock didn't have any unregistration function, which forced
> > us to use clk_unregister directly on it.
> >
> > While it was already not great from an API point of view, it also meant
> > that we were leaking the clk_composite structure allocated in
> > clk_register_composite.
> >
> > Add a clk_unregister_composite function to fix this.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
>
> I'm currently attempting to change the way clks are registered so
> that we don't return clk pointers from clk_register and have
> users add OF clk providers that return clk_hw pointers instead of
> clk pointers. Just a note, that this whole thing should be
> deleted in the next cycle if I can convert everything!
Ok.
>
> > drivers/clk/clk-composite.c | 15 +++++++++++++++
> > include/linux/clk-provider.h | 1 +
> > 2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> > index 1f903e1f86a2..b0f3b84ebd13 100644
> > --- a/drivers/clk/clk-composite.c
> > +++ b/drivers/clk/clk-composite.c
> > @@ -286,3 +286,18 @@ err:
> > kfree(composite);
> > return clk;
> > }
> > +
> > +void clk_unregister_composite(struct clk *clk)
> > +{
> > + struct clk_composite *composite;
> > + struct clk_hw *hw;
> > +
> > + hw = __clk_get_hw(clk);
> > + if (!hw)
> > + return;
> > +
> > + composite = to_clk_composite(hw);
> > +
> > + clk_unregister(clk);
> > + kfree(composite);
> > +}
>
> EXPORT_SYMBOL_GPL?
The register function is not registered, so I don't think that's
necessary.
> Do I need to pick this up?
I have a bunch of other clock patches that need this, so I guess it
would be easier if applied it directly with your acked-by, or if you
could apply it and give a stable branch I can base my future PR on.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-19 9:52 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 16:38 [PATCH v3 00/19] drm: Add Allwinner A10 display engine support Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 01/19] clk: composite: Add unregister function Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-10 9:16 ` Maxime Ripard
2016-04-10 9:16 ` Maxime Ripard
2016-04-10 9:16 ` Maxime Ripard
2016-04-15 22:28 ` Stephen Boyd
2016-04-15 22:28 ` Stephen Boyd
2016-04-15 22:28 ` Stephen Boyd
2016-04-19 9:52 ` Maxime Ripard [this message]
2016-04-19 9:52 ` Maxime Ripard
2016-04-19 9:52 ` Maxime Ripard
2016-04-21 22:16 ` Stephen Boyd
2016-04-21 22:16 ` Stephen Boyd
2016-04-21 22:16 ` Stephen Boyd
2016-03-23 16:38 ` [PATCH v3 02/19] clk: sunxi: Add display and TCON0 clocks driver Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-15 22:34 ` Stephen Boyd
2016-04-15 22:34 ` Stephen Boyd
2016-04-15 22:34 ` Stephen Boyd
2016-04-21 12:01 ` Maxime Ripard
2016-04-21 12:01 ` Maxime Ripard
2016-04-21 12:01 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 03/19] clk: sunxi: Add PLL3 clock Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-15 22:34 ` Stephen Boyd
2016-04-15 22:34 ` Stephen Boyd
2016-04-15 22:34 ` Stephen Boyd
2016-04-19 9:18 ` Maxime Ripard
2016-04-19 9:18 ` Maxime Ripard
2016-04-19 9:18 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 04/19] clk: sunxi: Add TCON channel1 clock Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-15 22:39 ` Stephen Boyd
2016-04-15 22:39 ` Stephen Boyd
2016-04-15 22:39 ` Stephen Boyd
2016-04-21 16:56 ` Maxime Ripard
2016-04-21 16:56 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 05/19] dt-bindings: clk: sun5i: add DRAM gates compatible Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-15 22:29 ` Stephen Boyd
2016-04-15 22:29 ` Stephen Boyd
2016-04-15 22:29 ` Stephen Boyd
2016-04-19 9:16 ` Maxime Ripard
2016-04-19 9:16 ` Maxime Ripard
2016-04-19 9:16 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 06/19] ARM: sun5i: dt: Add pll3 and pll7 clocks Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 07/19] ARM: sun5i: a13: Add display and TCON clocks Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 08/19] ARM: sun5i: Add DRAM gates Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-24 4:31 ` [linux-sunxi] " Chen-Yu Tsai
2016-03-24 4:31 ` Chen-Yu Tsai
2016-03-24 4:31 ` Chen-Yu Tsai
2016-03-29 10:07 ` [linux-sunxi] " Maxime Ripard
2016-03-29 10:07 ` Maxime Ripard
2016-03-29 10:07 ` Maxime Ripard
2016-04-19 10:02 ` Maxime Ripard
2016-04-19 10:02 ` Maxime Ripard
2016-04-19 10:02 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 09/19] ARM: sun5i: Add TV encoder gate to the DTSI Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-04-19 9:58 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 10/19] drm: fb: Add seq_file definition Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 11/19] drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-04-15 15:01 ` Thierry Reding
2016-04-15 15:01 ` Thierry Reding
2016-04-15 15:01 ` Thierry Reding
2016-03-23 16:38 ` [PATCH v3 12/19] drm: Add Allwinner A10 Display Engine support Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 13/19] drm: sun4i: Add DT bindings documentation Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-25 14:11 ` Rob Herring
2016-03-25 14:11 ` Rob Herring
2016-03-25 14:11 ` Rob Herring
2016-03-29 10:33 ` Maxime Ripard
2016-03-29 10:33 ` Maxime Ripard
2016-03-29 10:33 ` Maxime Ripard
2016-03-29 18:50 ` Rob Herring
2016-03-29 18:50 ` Rob Herring
2016-03-29 18:50 ` Rob Herring
2016-04-10 9:02 ` Maxime Ripard
2016-04-10 9:02 ` Maxime Ripard
2016-04-10 9:02 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 14/19] drm: sun4i: Add RGB output Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 15/19] drm: sun4i: Add composite output Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 16/19] drm: sun4i: tv: Add PAL output standard Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 17/19] drm: sun4i: tv: Add NTSC " Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 18/19] ARM: sun5i: r8: Add display blocks to the DTSI Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` [PATCH v3 19/19] ARM: sun5i: chip: Enable the TV Encoder Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
2016-03-23 16:38 ` Maxime Ripard
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=20160419095250.GA26050@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.