lkml.org 
[lkml]   [2019]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 6/9] clk: socfpga: Don't reference clk_init_data after registration
    From
    Date
    Hi Stephen,

    On 7/31/19 2:35 PM, Stephen Boyd wrote:
    > A future patch is going to change semantics of clk_register() so that
    > clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid
    > referencing this member here so that we don't run into NULL pointer
    > exceptions.
    >
    > Cc: Dinh Nguyen <dinguyen@kernel.org>
    > Signed-off-by: Stephen Boyd <sboyd@kernel.org>
    > ---
    >
    > Please ack so I can take this through clk tree
    >
    > drivers/clk/socfpga/clk-gate.c | 21 +++++++++++----------
    > drivers/clk/socfpga/clk-periph-a10.c | 7 ++++---
    > 2 files changed, 15 insertions(+), 13 deletions(-)
    >
    > diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c
    > index 3966cd43b552..b3c8143909dc 100644
    > --- a/drivers/clk/socfpga/clk-gate.c
    > +++ b/drivers/clk/socfpga/clk-gate.c
    > @@ -31,20 +31,20 @@ static u8 socfpga_clk_get_parent(struct clk_hw *hwclk)
    > u32 l4_src;
    > u32 perpll_src;

    You need this line here:

    const char *name = clk_hw_get_name(hwclk);

    Otherwise, it fails to build. With the above change:

    Acked-by: Dinh Nguyen <dinguyen@kernel.org>

    Thanks,
    Dinh

    \
     
     \ /
      Last update: 2019-08-01 17:14    [W:4.245 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site