linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stephen.boyd@linaro.org, linux-clk@vger.kernel.org
Subject: Re: [bug report] clk: berlin: Migrate to clk_hw based registration and OF APIs
Date: Wed, 16 Nov 2016 10:54:56 -0800	[thread overview]
Message-ID: <20161116185456.GF25626@codeaurora.org> (raw)
In-Reply-To: <20161116140701.GA20563@mwanda>

On 11/16, Dan Carpenter wrote:
> Hello Stephen Boyd,
> 
> The patch f6475e298297: "clk: berlin: Migrate to clk_hw based
> registration and OF APIs" from Aug 16, 2016, leads to the following
> static checker warning:
> 
> 	drivers/clk/berlin/bg2.c:688 berlin2_clock_setup()
> 	warn: did you mean to pass the address of 'clk_data'
> 
> drivers/clk/berlin/bg2.c
>    674          hws[CLKID_TWD] =
>    675                  clk_hw_register_fixed_factor(NULL, "twd", "cpu", 0, 1, 3);
>    676  
>    677          /* check for errors on leaf clocks */
>    678          for (n = 0; n < MAX_CLKS; n++) {
>    679                  if (!IS_ERR(hws[n]))
>    680                          continue;
>    681  
>    682                  pr_err("%s: Unable to register leaf clock %d\n",
>    683                         np->full_name, n);
>    684                  goto bg2_fail;
>    685          }
>    686  
>    687          /* register clk-provider */
>    688          of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &clk_data);
>                                                                   ^^^^^^^^^
> Pretty sure this was overlooked when we switched to allocating this
> with kmalloc().  Should just be passing clk_data.  Same for the
> following warnings as well:
> 
> drivers/clk/berlin/bg2q.c:385 berlin2q_clock_setup() warn: did you mean to pass the address of 'clk_data'
> drivers/clk/clk-efm32gg.c:85 efm32gg_cmu_init() warn: did you mean to pass the address of 'clk_data'

Thanks! I guess there are new checks in smatch that have been
introduced lately to find these problems? I'll go fix all these
up now and add a Reported-by appropriately.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

      reply	other threads:[~2016-11-16 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 14:07 [bug report] clk: berlin: Migrate to clk_hw based registration and OF APIs Dan Carpenter
2016-11-16 18:54 ` Stephen Boyd [this message]

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=20161116185456.GF25626@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=stephen.boyd@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).