From: Stephen Boyd <sboyd@codeaurora.org>
To: Mike Turquette <mturquette@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: [PATCH 17/19] clk: xgene: Silence sparse warnings
Date: Wed, 6 May 2015 00:39:54 -0700 [thread overview]
Message-ID: <1430897996-11597-18-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1430897996-11597-1-git-send-email-sboyd@codeaurora.org>
drivers/clk/clk-xgene.c:77:43: warning: incorrect type in argument 1 (different address spaces)
drivers/clk/clk-xgene.c:77:43: expected void *csr
drivers/clk/clk-xgene.c:77:43: got void [noderef] <asn:2>*
...
drivers/clk/clk-xgene.c: In function ‘xgene_clk_enable’:
drivers/clk/clk-xgene.c:237:3: warning: format ‘%LX’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘phys_addr_t’ [-Wformat]
drivers/clk/clk-xgene.c:248:3: warning: format ‘%LX’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘phys_addr_t’ [-Wformat]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
drivers/clk/clk-xgene.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index dd8a62d8f11f..f26b3ac36b27 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -42,12 +42,12 @@
static DEFINE_SPINLOCK(clk_lock);
-static inline u32 xgene_clk_read(void *csr)
+static inline u32 xgene_clk_read(void __iomem *csr)
{
return readl_relaxed(csr);
}
-static inline void xgene_clk_write(u32 data, void *csr)
+static inline void xgene_clk_write(u32 data, void __iomem *csr)
{
return writel_relaxed(data, csr);
}
@@ -119,7 +119,7 @@ static unsigned long xgene_clk_pll_recalc_rate(struct clk_hw *hw,
return fvco / nout;
}
-const struct clk_ops xgene_clk_pll_ops = {
+static const struct clk_ops xgene_clk_pll_ops = {
.is_enabled = xgene_clk_pll_is_enabled,
.recalc_rate = xgene_clk_pll_recalc_rate,
};
@@ -167,7 +167,7 @@ static void xgene_pllclk_init(struct device_node *np, enum xgene_pll_type pll_ty
{
const char *clk_name = np->full_name;
struct clk *clk;
- void *reg;
+ void __iomem *reg;
reg = of_iomap(np, 0);
if (reg == NULL) {
@@ -222,20 +222,22 @@ static int xgene_clk_enable(struct clk_hw *hw)
struct xgene_clk *pclk = to_xgene_clk(hw);
unsigned long flags = 0;
u32 data;
+ phys_addr_t reg;
if (pclk->lock)
spin_lock_irqsave(pclk->lock, flags);
if (pclk->param.csr_reg != NULL) {
pr_debug("%s clock enabled\n", pclk->name);
+ reg = __pa(pclk->param.csr_reg);
/* First enable the clock */
data = xgene_clk_read(pclk->param.csr_reg +
pclk->param.reg_clk_offset);
data |= pclk->param.reg_clk_mask;
xgene_clk_write(data, pclk->param.csr_reg +
pclk->param.reg_clk_offset);
- pr_debug("%s clock PADDR base 0x%016LX clk offset 0x%08X mask 0x%08X value 0x%08X\n",
- pclk->name, __pa(pclk->param.csr_reg),
+ pr_debug("%s clock PADDR base %pa clk offset 0x%08X mask 0x%08X value 0x%08X\n",
+ pclk->name, ®,
pclk->param.reg_clk_offset, pclk->param.reg_clk_mask,
data);
@@ -245,8 +247,8 @@ static int xgene_clk_enable(struct clk_hw *hw)
data &= ~pclk->param.reg_csr_mask;
xgene_clk_write(data, pclk->param.csr_reg +
pclk->param.reg_csr_offset);
- pr_debug("%s CSR RESET PADDR base 0x%016LX csr offset 0x%08X mask 0x%08X value 0x%08X\n",
- pclk->name, __pa(pclk->param.csr_reg),
+ pr_debug("%s CSR RESET PADDR base %pa csr offset 0x%08X mask 0x%08X value 0x%08X\n",
+ pclk->name, ®,
pclk->param.reg_csr_offset, pclk->param.reg_csr_mask,
data);
}
@@ -386,7 +388,7 @@ static long xgene_clk_round_rate(struct clk_hw *hw, unsigned long rate,
return parent_rate / divider;
}
-const struct clk_ops xgene_clk_ops = {
+static const struct clk_ops xgene_clk_ops = {
.enable = xgene_clk_enable,
.disable = xgene_clk_disable,
.is_enabled = xgene_clk_is_enabled,
@@ -456,7 +458,7 @@ static void __init xgene_devclk_init(struct device_node *np)
parameters.csr_reg = NULL;
parameters.divider_reg = NULL;
for (i = 0; i < 2; i++) {
- void *map_res;
+ void __iomem *map_res;
rc = of_address_to_resource(np, i, &res);
if (rc != 0) {
if (i == 0) {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-05-06 7:42 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
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 ` Stephen Boyd [this message]
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=1430897996-11597-18-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@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