From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Stephen Boyd <sboyd@codeaurora.org>,
Mike Turquette <mturquette@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>,
Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH 13/19] clk: ti: Silence sparse warnings
Date: Wed, 6 May 2015 11:15:07 +0300 [thread overview]
Message-ID: <5549CD8B.4070601@ti.com> (raw)
In-Reply-To: <1430897996-11597-14-git-send-email-sboyd@codeaurora.org>
On 05/06/2015 10:39 AM, Stephen Boyd wrote:
> drivers/clk/ti/clk.c:125:31: warning: incorrect type in return expression (different address spaces)
> drivers/clk/ti/clk.c:125:31: expected void [noderef] <asn:2>*
> drivers/clk/ti/clk.c:125:31: got void *
> drivers/clk/ti/clk.c:132:31: warning: incorrect type in return expression (different address spaces)
> drivers/clk/ti/clk.c:132:31: expected void [noderef] <asn:2>*
> drivers/clk/ti/clk.c:132:31: got void *
> drivers/clk/ti/dpll.c:180:14: warning: symbol '_get_reg' was not declared. Should it be static?
> drivers/clk/ti/fapll.c:624:32: warning: Using plain integer as NULL pointer
> drivers/clk/ti/fapll.c:625:31: warning: Using plain integer as NULL pointer
> drivers/clk/ti/fapll.c:630:40: warning: Using plain integer as NULL pointer
> drivers/clk/ti/clk-dra7-atl.c:158:22: warning: symbol 'atl_clk_ops' was not declared. Should it be static?
> drivers/clk/ti/clk-dra7-atl.c:170:39: warning: Using plain integer as NULL pointer
>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/clk/ti/clk-dra7-atl.c | 4 ++--
> drivers/clk/ti/clk.c | 4 ++--
> drivers/clk/ti/dpll.c | 2 +-
> drivers/clk/ti/fapll.c | 6 +++---
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index d86bc46b93bd..1fe7429a7536 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -155,7 +155,7 @@ static int atl_clk_set_rate(struct clk_hw *hw, unsigned long rate,
> return 0;
> }
>
> -const struct clk_ops atl_clk_ops = {
> +static const struct clk_ops atl_clk_ops = {
> .enable = atl_clk_enable,
> .disable = atl_clk_disable,
> .is_enabled = atl_clk_is_enabled,
> @@ -167,7 +167,7 @@ const struct clk_ops atl_clk_ops = {
> static void __init of_dra7_atl_clock_setup(struct device_node *node)
> {
> struct dra7_atl_desc *clk_hw = NULL;
> - struct clk_init_data init = { 0 };
> + struct clk_init_data init = { NULL };
> const char **parent_names = NULL;
> struct clk *clk;
>
> diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
> index 0ebe5c51062b..64bb5e8a3b8c 100644
> --- a/drivers/clk/ti/clk.c
> +++ b/drivers/clk/ti/clk.c
> @@ -122,14 +122,14 @@ void __iomem *ti_clk_get_reg_addr(struct device_node *node, int index)
>
> if (i == CLK_MAX_MEMMAPS) {
> pr_err("clk-provider not found for %s!\n", node->name);
> - return ERR_PTR(-ENOENT);
> + return IOMEM_ERR_PTR(-ENOENT);
> }
>
> reg->index = i;
>
> if (of_property_read_u32_index(node, "reg", index, &val)) {
> pr_err("%s must have reg[%d]!\n", node->name, index);
> - return ERR_PTR(-EINVAL);
> + return IOMEM_ERR_PTR(-EINVAL);
> }
>
> reg->offset = val;
> diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
> index 11478a501c30..2aacf7a3bcae 100644
> --- a/drivers/clk/ti/dpll.c
> +++ b/drivers/clk/ti/dpll.c
> @@ -177,7 +177,7 @@ cleanup:
> }
>
> #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_ATAGS)
> -void __iomem *_get_reg(u8 module, u16 offset)
> +static void __iomem *_get_reg(u8 module, u16 offset)
> {
> u32 reg;
> struct clk_omap_reg *reg_setup;
> diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c
> index ffcd8e09e85b..730aa62454a2 100644
> --- a/drivers/clk/ti/fapll.c
> +++ b/drivers/clk/ti/fapll.c
> @@ -621,13 +621,13 @@ static void __init ti_fapll_setup(struct device_node *node)
>
> /* Check for hardwired audio_pll_clk1 */
> if (is_audio_pll_clk1(freq)) {
> - freq = 0;
> - div = 0;
> + freq = NULL;
> + div = NULL;
> } else {
> /* Does the synthesizer have a FREQ register? */
> v = readl_relaxed(freq);
> if (!v)
> - freq = 0;
> + freq = NULL;
> }
> synth_clk = ti_fapll_synth_setup(fd, freq, div, output_instance,
> output_name, node->name,
>
--
Péter
next prev parent reply other threads:[~2015-05-06 8:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 7:39 [PATCH 00/19] Fix sparse errors in drivers/clk/ Stephen Boyd
2015-05-06 7:39 ` [PATCH 01/19] clk: gpio-gate: Don't export __init functions Stephen Boyd
2015-05-06 7:39 ` [PATCH 02/19] clk: Silence sparse warnings about __clk_{get,put}() Stephen Boyd
2015-05-06 7:39 ` [PATCH 03/19] clk: max-gen: Silence sparse warnings Stephen Boyd
2015-05-06 9:23 ` Javier Martinez Canillas
2015-05-06 7:39 ` [PATCH 04/19] clk: bcm/kona: " Stephen Boyd
2015-05-06 13:21 ` Alex Elder
2015-05-06 7:39 ` [PATCH 05/19] clk: bcm/kona: Remove ccu_list Stephen Boyd
2015-05-06 13:23 ` Alex Elder
2015-05-06 7:39 ` [PATCH 06/19] clk: berlin: Silence sparse warning Stephen Boyd
2015-05-06 22:28 ` Sebastian Hesselbarth
2015-05-06 7:39 ` [PATCH 07/19] clk: hix5hd2: Silence sparse warnings Stephen Boyd
2015-05-06 8:55 ` zhangfei
2015-05-06 7:39 ` [PATCH 08/19] clk: samsung: " Stephen Boyd
2015-05-06 10:53 ` Sylwester Nawrocki
2015-05-06 7:39 ` [PATCH 09/19] clk: emev2: " Stephen Boyd
2015-05-07 4:36 ` Simon Horman
2015-05-07 5:17 ` Stephen Boyd
2015-05-07 5:31 ` Simon Horman
2015-05-06 7:39 ` [PATCH 10/19] clk: sirf: " Stephen Boyd
2015-05-06 7:39 ` [PATCH 11/19] clk: socfpga: Silence sparse warning Stephen Boyd
2015-05-06 7:39 ` [PATCH 12/19] clk: st: Silence sparse warnings Stephen Boyd
2015-05-06 7:39 ` [PATCH 13/19] clk: ti: " Stephen Boyd
2015-05-06 8:15 ` Peter Ujfalusi [this message]
2015-05-07 8:16 ` Tero Kristo
2015-05-06 7:39 ` [PATCH 14/19] clk: versatile: " Stephen Boyd
2015-05-06 10:31 ` Pawel Moll
2015-05-06 7:39 ` [PATCH 15/19] clk: socfpga: Silence sparse warning Stephen Boyd
2015-05-06 7:39 ` [PATCH 16/19] clk: mmp: Silence sparse warnings Stephen Boyd
2015-05-06 7:39 ` [PATCH 17/19] clk: xgene: " Stephen Boyd
2015-05-06 7:39 ` [PATCH 18/19] clk: moxart: " Stephen Boyd
2015-05-06 7:39 ` [PATCH 19/19] clk: u300: " Stephen Boyd
2015-05-12 10:38 ` 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=5549CD8B.4070601@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=sboyd@codeaurora.org \
--cc=t-kristo@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox