2015-05-06 07:46:26

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 00/19] Fix sparse errors in drivers/clk/

This patchset fixes most of the sparse errors in drivers/clk/ that
I could find. The rest of the errors are mostly to do with conditional
locking and a couple drivers that cast an iomem pointer to an int to
compare addresses.

Cc: Alexandre Belloni <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Chao Xie <[email protected]>
Cc: Dinh Nguyen <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Jonas Jensen <[email protected]>
Cc: Jyri Sarha <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Peter Ujfalusi <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Takashi Yoshii <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Tim Kryger <[email protected]>
Cc: Zhangfei Gao <[email protected]>

Stephen Boyd (19):
clk: gpio-gate: Don't export __init functions
clk: Silence sparse warnings about __clk_{get,put}()
clk: max-gen: Silence sparse warnings
clk: bcm/kona: Silence sparse warnings
clk: bcm/kona: Remove ccu_list
clk: berlin: Silence sparse warning
clk: hix5hd2: Silence sparse warnings
clk: samsung: Silence sparse warnings
clk: emev2: Silence sparse warnings
clk: sirf: Silence sparse warnings
clk: socfpga: Silence sparse warning
clk: st: Silence sparse warnings
clk: ti: Silence sparse warnings
clk: versatile: Silence sparse warnings
clk: socfpga: Silence sparse warning
clk: mmp: Silence sparse warnings
clk: xgene: Silence sparse warnings
clk: moxart: Silence sparse warnings
clk: u300: Silence sparse warnings

drivers/clk/bcm/clk-kona-setup.c | 4 ----
drivers/clk/bcm/clk-kona.c | 2 +-
drivers/clk/bcm/clk-kona.h | 2 --
drivers/clk/berlin/berlin2-pll.c | 9 +--------
drivers/clk/clk-gpio-gate.c | 3 +--
drivers/clk/clk-max-gen.c | 2 ++
drivers/clk/clk-moxart.c | 4 ++--
drivers/clk/clk-u300.c | 1 +
drivers/clk/clk-xgene.c | 22 ++++++++++++----------
drivers/clk/clk.c | 1 +
drivers/clk/hisilicon/clk-hix5hd2.c | 5 +++--
drivers/clk/mmp/clk-apbc.c | 2 +-
drivers/clk/mmp/clk-apmu.c | 2 +-
drivers/clk/samsung/clk-exynos5260.c | 26 +++++++++++++-------------
drivers/clk/shmobile/clk-emev2.c | 2 +-
drivers/clk/sirf/clk-common.c | 4 ++--
drivers/clk/socfpga/clk-gate.c | 2 +-
drivers/clk/socfpga/clk-periph.c | 2 +-
drivers/clk/st/clk-flexgen.c | 6 +++---
drivers/clk/st/clkgen-fsyn.c | 4 ++--
drivers/clk/st/clkgen-mux.c | 14 +++++++-------
drivers/clk/st/clkgen-pll.c | 10 +++++-----
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 +++---
drivers/clk/versatile/clk-sp810.c | 4 ++--
27 files changed, 71 insertions(+), 78 deletions(-)

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


2015-05-06 07:40:05

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 01/19] clk: gpio-gate: Don't export __init functions

This function is marked as __init, so exposing it to modules
doesn't make any sense and it isn't used by modules anyway.

drivers/clk/clk-gpio-gate.c:192:13: warning: symbol 'of_gpio_gate_clk_setup' was not declared. Should it be static?

Cc: Jyri Sarha <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-gpio-gate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/clk-gpio-gate.c b/drivers/clk/clk-gpio-gate.c
index a71cabedda93..f564e624fb93 100644
--- a/drivers/clk/clk-gpio-gate.c
+++ b/drivers/clk/clk-gpio-gate.c
@@ -189,7 +189,7 @@ static struct clk *of_clk_gpio_gate_delayed_register_get(
/**
* of_gpio_gate_clk_setup() - Setup function for gpio controlled clock
*/
-void __init of_gpio_gate_clk_setup(struct device_node *node)
+static void __init of_gpio_gate_clk_setup(struct device_node *node)
{
struct clk_gpio_gate_delayed_register_data *data;

@@ -203,6 +203,5 @@ void __init of_gpio_gate_clk_setup(struct device_node *node)

of_clk_add_provider(node, of_clk_gpio_gate_delayed_register_get, data);
}
-EXPORT_SYMBOL_GPL(of_gpio_gate_clk_setup);
CLK_OF_DECLARE(gpio_gate_clk, "gpio-gate-clock", of_gpio_gate_clk_setup);
#endif
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:40:08

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 02/19] clk: Silence sparse warnings about __clk_{get,put}()

drivers/clk/clk.c:2700:5: warning: symbol '__clk_get' was not declared. Should it be static?
drivers/clk/clk.c:2713:6: warning: symbol '__clk_put' was not declared. Should it be static?

Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 36d1a0156ce7..30d45c657a07 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -21,6 +21,7 @@
#include <linux/device.h>
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/clkdev.h>

#include "clk.h"

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

2015-05-06 07:40:11

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 03/19] clk: max-gen: Silence sparse warnings

drivers/clk/clk-max-gen.c:82:16: warning: symbol 'max_gen_clk_ops' was not declared. Should it be static?
drivers/clk/clk-max-gen.c:109:5: warning: symbol 'max_gen_clk_probe' was not declared. Should it be static?
drivers/clk/clk-max-gen.c:183:5: warning: symbol 'max_gen_clk_remove' was not declared. Should it be static?

Cc: Javier Martinez Canillas <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-max-gen.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-max-gen.c b/drivers/clk/clk-max-gen.c
index 6505049d50f1..35af9cb6da4f 100644
--- a/drivers/clk/clk-max-gen.c
+++ b/drivers/clk/clk-max-gen.c
@@ -31,6 +31,8 @@
#include <linux/of.h>
#include <linux/export.h>

+#include "clk-max-gen.h"
+
struct max_gen_clk {
struct regmap *regmap;
u32 mask;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:40:14

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 04/19] clk: bcm/kona: Silence sparse warnings

drivers/clk/bcm/clk-kona.c:1243:16: warning: odd constant _Bool cast (ffffffffffffffea becomes 1)

Cc: Alex Elder <[email protected]>
Cc: Tim Kryger <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/bcm/clk-kona.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/bcm/clk-kona.c b/drivers/clk/bcm/clk-kona.c
index a0ef4f75d457..79a98506c433 100644
--- a/drivers/clk/bcm/clk-kona.c
+++ b/drivers/clk/bcm/clk-kona.c
@@ -1240,7 +1240,7 @@ static bool __kona_clk_init(struct kona_clk *bcm_clk)
default:
BUG();
}
- return -EINVAL;
+ return false;
}

/* Set a CCU and all its clocks into their desired initial state */
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:40:19

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 05/19] clk: bcm/kona: Remove ccu_list

This list doesn't look to be used. Let's remove it and any
associated code that would be manipulating this list. This also
silences this error:

drivers/clk/bcm/clk-kona-setup.c:24:1: warning: symbol 'ccu_list' was not declared. Should it be static?

Cc: Alex Elder <[email protected]>
Cc: Tim Kryger <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/bcm/clk-kona-setup.c | 4 ----
drivers/clk/bcm/clk-kona.h | 2 --
2 files changed, 6 deletions(-)

diff --git a/drivers/clk/bcm/clk-kona-setup.c b/drivers/clk/bcm/clk-kona-setup.c
index e5aededdd322..deaa7f962b84 100644
--- a/drivers/clk/bcm/clk-kona-setup.c
+++ b/drivers/clk/bcm/clk-kona-setup.c
@@ -21,8 +21,6 @@
#define selector_clear_exists(sel) ((sel)->width = 0)
#define trigger_clear_exists(trig) FLAG_CLEAR(trig, TRIG, EXISTS)

-LIST_HEAD(ccu_list); /* The list of set up CCUs */
-
/* Validity checking */

static bool ccu_data_offsets_valid(struct ccu_data *ccu)
@@ -773,7 +771,6 @@ static void kona_ccu_teardown(struct ccu_data *ccu)

of_clk_del_provider(ccu->node); /* safe if never added */
ccu_clks_teardown(ccu);
- list_del(&ccu->links);
of_node_put(ccu->node);
ccu->node = NULL;
iounmap(ccu->base);
@@ -847,7 +844,6 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu,
goto out_err;
}
ccu->node = of_node_get(node);
- list_add_tail(&ccu->links, &ccu_list);

/*
* Set up each defined kona clock and save the result in
diff --git a/drivers/clk/bcm/clk-kona.h b/drivers/clk/bcm/clk-kona.h
index 6849a64baf6d..906576ec97b6 100644
--- a/drivers/clk/bcm/clk-kona.h
+++ b/drivers/clk/bcm/clk-kona.h
@@ -480,7 +480,6 @@ struct ccu_data {
spinlock_t lock; /* serialization lock */
bool write_enabled; /* write access is currently enabled */
struct ccu_policy policy;
- struct list_head links; /* for ccu_list */
struct device_node *node;
struct clk_onecell_data clk_data;
const char *name;
@@ -492,7 +491,6 @@ struct ccu_data {
#define KONA_CCU_COMMON(_prefix, _name, _ccuname) \
.name = #_name "_ccu", \
.lock = __SPIN_LOCK_UNLOCKED(_name ## _ccu_data.lock), \
- .links = LIST_HEAD_INIT(_name ## _ccu_data.links), \
.clk_data = { \
.clk_num = _prefix ## _ ## _ccuname ## _CCU_CLOCK_COUNT, \
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:46:23

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 06/19] clk: berlin: Silence sparse warning

drivers/clk/berlin/berlin2-pll.c:94:12: warning: symbol 'berlin2_pll_register' was not declared. Should it be static?

Cc: Alexandre Belloni <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/berlin/berlin2-pll.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
index bdc506b03824..f4b8d324b083 100644
--- a/drivers/clk/berlin/berlin2-pll.c
+++ b/drivers/clk/berlin/berlin2-pll.c
@@ -25,14 +25,7 @@
#include <asm/div64.h>

#include "berlin2-div.h"
-
-struct berlin2_pll_map {
- const u8 vcodiv[16];
- u8 mult;
- u8 fbdiv_shift;
- u8 rfdiv_shift;
- u8 divsel_shift;
-};
+#include "berlin2-pll.h"

struct berlin2_pll {
struct clk_hw hw;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:46:19

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 07/19] clk: hix5hd2: Silence sparse warnings

drivers/clk/hisilicon/clk-hix5hd2.c:255:13: warning: symbol 'hix5hd2_clk_register_complex' was not declared. Should it be static?

Cc: Zhangfei Gao <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/hisilicon/clk-hix5hd2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c
index f1d239435826..78bd95b6fc7b 100644
--- a/drivers/clk/hisilicon/clk-hix5hd2.c
+++ b/drivers/clk/hisilicon/clk-hix5hd2.c
@@ -252,8 +252,9 @@ static struct clk_ops clk_complex_ops = {
.disable = clk_complex_disable,
};

-void __init hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks,
- int nums, struct hisi_clock_data *data)
+static void __init
+hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks, int nums,
+ struct hisi_clock_data *data)
{
void __iomem *base = data->base;
int i;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:44:48

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 08/19] clk: samsung: Silence sparse warnings

drivers/clk/samsung/clk-exynos5260.c:138:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:328:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:392:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:494:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:583:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:644:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:779:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:898:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:962:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:1018:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:1165:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:1373:40: warning: Using plain integer as NULL pointer
drivers/clk/samsung/clk-exynos5260.c:1829:40: warning: Using plain integer as NULL pointer

Cc: Sylwester Nawrocki <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/samsung/clk-exynos5260.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
index df1d83c45554..06f96eb7cf93 100644
--- a/drivers/clk/samsung/clk-exynos5260.c
+++ b/drivers/clk/samsung/clk-exynos5260.c
@@ -135,7 +135,7 @@ static struct samsung_gate_clock aud_gate_clks[] __initdata = {

static void __init exynos5260_clk_aud_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = aud_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(aud_mux_clks);
@@ -325,7 +325,7 @@ static struct samsung_gate_clock disp_gate_clks[] __initdata = {

static void __init exynos5260_clk_disp_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = disp_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(disp_mux_clks);
@@ -389,7 +389,7 @@ static struct samsung_pll_clock egl_pll_clks[] __initdata = {

static void __init exynos5260_clk_egl_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.pll_clks = egl_pll_clks;
cmu.nr_pll_clks = ARRAY_SIZE(egl_pll_clks);
@@ -491,7 +491,7 @@ static struct samsung_gate_clock fsys_gate_clks[] __initdata = {

static void __init exynos5260_clk_fsys_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = fsys_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(fsys_mux_clks);
@@ -580,7 +580,7 @@ static struct samsung_gate_clock g2d_gate_clks[] __initdata = {

static void __init exynos5260_clk_g2d_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = g2d_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(g2d_mux_clks);
@@ -641,7 +641,7 @@ static struct samsung_pll_clock g3d_pll_clks[] __initdata = {

static void __init exynos5260_clk_g3d_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.pll_clks = g3d_pll_clks;
cmu.nr_pll_clks = ARRAY_SIZE(g3d_pll_clks);
@@ -776,7 +776,7 @@ static struct samsung_gate_clock gscl_gate_clks[] __initdata = {

static void __init exynos5260_clk_gscl_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = gscl_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(gscl_mux_clks);
@@ -895,7 +895,7 @@ static struct samsung_gate_clock isp_gate_clks[] __initdata = {

static void __init exynos5260_clk_isp_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = isp_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(isp_mux_clks);
@@ -959,7 +959,7 @@ static struct samsung_pll_clock kfc_pll_clks[] __initdata = {

static void __init exynos5260_clk_kfc_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.pll_clks = kfc_pll_clks;
cmu.nr_pll_clks = ARRAY_SIZE(kfc_pll_clks);
@@ -1015,7 +1015,7 @@ static struct samsung_gate_clock mfc_gate_clks[] __initdata = {

static void __init exynos5260_clk_mfc_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = mfc_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(mfc_mux_clks);
@@ -1162,7 +1162,7 @@ static struct samsung_pll_clock mif_pll_clks[] __initdata = {

static void __init exynos5260_clk_mif_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.pll_clks = mif_pll_clks;
cmu.nr_pll_clks = ARRAY_SIZE(mif_pll_clks);
@@ -1370,7 +1370,7 @@ static struct samsung_gate_clock peri_gate_clks[] __initdata = {

static void __init exynos5260_clk_peri_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.mux_clks = peri_mux_clks;
cmu.nr_mux_clks = ARRAY_SIZE(peri_mux_clks);
@@ -1826,7 +1826,7 @@ static struct samsung_pll_clock top_pll_clks[] __initdata = {

static void __init exynos5260_clk_top_init(struct device_node *np)
{
- struct samsung_cmu_info cmu = {0};
+ struct samsung_cmu_info cmu = { NULL };

cmu.pll_clks = top_pll_clks;
cmu.nr_pll_clks = ARRAY_SIZE(top_pll_clks);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:44:45

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 09/19] clk: emev2: Silence sparse warnings

drivers/clk/shmobile/clk-emev2.c:37:14: warning: symbol 'smu_base' was not declared. Should it be static?

Cc: Takashi Yoshii <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Simon Horman <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/shmobile/clk-emev2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/shmobile/clk-emev2.c b/drivers/clk/shmobile/clk-emev2.c
index 6c7c929c7765..5b60beb7d0eb 100644
--- a/drivers/clk/shmobile/clk-emev2.c
+++ b/drivers/clk/shmobile/clk-emev2.c
@@ -34,7 +34,7 @@
static DEFINE_SPINLOCK(lock);

/* not pretty, but hey */
-void __iomem *smu_base;
+static void __iomem *smu_base;

static void __init emev2_smu_write(unsigned long value, int offs)
{
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:44:51

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 10/19] clk: sirf: Silence sparse warnings

These are __iomem pointers. Mark them appropriately so we don't
get sparse errors like

drivers/clk/sirf/clk-common.c:60:16: warning: incorrect type in argument 1 (different address spaces)
drivers/clk/sirf/clk-common.c:60:16: expected void const volatile [noderef] <asn:2>*addr
drivers/clk/sirf/clk-common.c:60:16: got void *

Cc: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/sirf/clk-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/sirf/clk-common.c b/drivers/clk/sirf/clk-common.c
index e9cf5730effe..9fc285d784d3 100644
--- a/drivers/clk/sirf/clk-common.c
+++ b/drivers/clk/sirf/clk-common.c
@@ -10,8 +10,8 @@
#define KHZ 1000
#define MHZ (KHZ * KHZ)

-static void *sirfsoc_clk_vbase;
-static void *sirfsoc_rsc_vbase;
+static void __iomem *sirfsoc_clk_vbase;
+static void __iomem *sirfsoc_rsc_vbase;
static struct clk_onecell_data clk_data;

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

2015-05-06 07:44:41

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 11/19] clk: socfpga: Silence sparse warning

drivers/clk/socfpga/clk-gate.c:227:40: warning: Using plain integer as NULL pointer

Cc: Dinh Nguyen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/socfpga/clk-gate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c
index dd3a78c64795..0d5dc84372dc 100644
--- a/drivers/clk/socfpga/clk-gate.c
+++ b/drivers/clk/socfpga/clk-gate.c
@@ -224,7 +224,7 @@ static void __init __socfpga_gate_init(struct device_node *node,
socfpga_clk->shift = div_reg[1];
socfpga_clk->width = div_reg[2];
} else {
- socfpga_clk->div_reg = 0;
+ socfpga_clk->div_reg = NULL;
}

rc = of_property_read_u32_array(node, "clk-phase", clk_phase, 2);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:44:06

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 12/19] clk: st: Silence sparse warnings

drivers/clk/st/clkgen-mux.c:134:4: warning: symbol 'clkgena_divmux_get_parent' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:171:15: warning: symbol 'clkgena_divmux_recalc_rate' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:218:12: warning: symbol 'clk_register_genamux' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:388:13: warning: symbol 'st_of_clkgena_divmux_setup' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:488:13: warning: symbol 'st_of_clkgena_prediv_setup' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:625:13: warning: symbol 'st_of_clkgen_mux_setup' was not declared. Should it be static?
drivers/clk/st/clkgen-mux.c:702:13: warning: symbol 'st_of_clkgen_vcc_setup' was not declared. Should it be static?
drivers/clk/st/clkgen-pll.c:273:15: warning: symbol 'recalc_stm_pll800c65' was not declared. Should it be static?
drivers/clk/st/clkgen-pll.c:300:15: warning: symbol 'recalc_stm_pll1600c65' was not declared. Should it be static?
drivers/clk/st/clkgen-pll.c:324:15: warning: symbol 'recalc_stm_pll3200c32' was not declared. Should it be static?
drivers/clk/st/clkgen-pll.c:346:15: warning: symbol 'recalc_stm_pll1200c32' was not declared. Should it be static?
drivers/clk/st/clkgen-pll.c:565:19: warning: incorrect type in assignment (different address spaces)
drivers/clk/st/clkgen-pll.c:565:19: expected void [noderef] <asn:2>*reg
drivers/clk/st/clkgen-pll.c:565:19: got void *
drivers/clk/st/clkgen-pll.c:576:18: warning: incorrect type in assignment (different address spaces)
drivers/clk/st/clkgen-pll.c:576:18: expected void [noderef] <asn:2>*reg
drivers/clk/st/clkgen-pll.c:576:18: got void *
drivers/clk/st/clkgen-pll.c:693:53: warning: incorrect type in argument 2 (different address spaces)
drivers/clk/st/clkgen-pll.c:693:53: expected void *[noderef] <asn:2>reg
drivers/clk/st/clkgen-pll.c:693:53: got void [noderef] <asn:2>*[assigned] pll_base
drivers/clk/st/clkgen-fsyn.c:495:5: warning: symbol 'clk_fs660c32_vco_get_rate' was not declared. Should it be static?
drivers/clk/st/clkgen-fsyn.c:522:5: warning: symbol 'clk_fs660c32_vco_get_params' was not declared. Should it be static?
drivers/clk/st/clk-flexgen.c:119:15: warning: symbol 'flexgen_recalc_rate' was not declared. Should it be static?
drivers/clk/st/clk-flexgen.c:177:12: warning: symbol 'clk_register_flexgen' was not declared. Should it be static?
drivers/clk/st/clk-flexgen.c:263:13: warning: symbol 'st_of_flexgen_setup' was not declared. Should it be static?

Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/st/clk-flexgen.c | 6 +++---
drivers/clk/st/clkgen-fsyn.c | 4 ++--
drivers/clk/st/clkgen-mux.c | 14 +++++++-------
drivers/clk/st/clkgen-pll.c | 10 +++++-----
4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index bf12a25eb3a2..409ed4b0b569 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -116,7 +116,7 @@ static long flexgen_round_rate(struct clk_hw *hw, unsigned long rate,
return *prate / div;
}

-unsigned long flexgen_recalc_rate(struct clk_hw *hw,
+static unsigned long flexgen_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct flexgen *flexgen = to_flexgen(hw);
@@ -174,7 +174,7 @@ static const struct clk_ops flexgen_ops = {
.set_rate = flexgen_set_rate,
};

-struct clk *clk_register_flexgen(const char *name,
+static struct clk *clk_register_flexgen(const char *name,
const char **parent_names, u8 num_parents,
void __iomem *reg, spinlock_t *lock, u32 idx,
unsigned long flexgen_flags) {
@@ -260,7 +260,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
return parents;
}

-void __init st_of_flexgen_setup(struct device_node *np)
+static void __init st_of_flexgen_setup(struct device_node *np)
{
struct device_node *pnode;
void __iomem *reg;
diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
index a917c4c7eaa9..e94197f04b0b 100644
--- a/drivers/clk/st/clkgen-fsyn.c
+++ b/drivers/clk/st/clkgen-fsyn.c
@@ -492,7 +492,7 @@ static int quadfs_pll_is_enabled(struct clk_hw *hw)
return !!npda;
}

-int clk_fs660c32_vco_get_rate(unsigned long input, struct stm_fs *fs,
+static int clk_fs660c32_vco_get_rate(unsigned long input, struct stm_fs *fs,
unsigned long *rate)
{
unsigned long nd = fs->ndiv + 16; /* ndiv value */
@@ -519,7 +519,7 @@ static unsigned long quadfs_pll_fs660c32_recalc_rate(struct clk_hw *hw,
return rate;
}

-int clk_fs660c32_vco_get_params(unsigned long input,
+static int clk_fs660c32_vco_get_params(unsigned long input,
unsigned long output, struct stm_fs *fs)
{
/* Formula
diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c
index fdcff10f6d30..80aa77dbf660 100644
--- a/drivers/clk/st/clkgen-mux.c
+++ b/drivers/clk/st/clkgen-mux.c
@@ -131,7 +131,7 @@ static int clkgena_divmux_is_enabled(struct clk_hw *hw)
return (s8)clk_mux_ops.get_parent(mux_hw) > 0;
}

-u8 clkgena_divmux_get_parent(struct clk_hw *hw)
+static u8 clkgena_divmux_get_parent(struct clk_hw *hw)
{
struct clkgena_divmux *genamux = to_clkgena_divmux(hw);
struct clk_hw *mux_hw = &genamux->mux.hw;
@@ -168,7 +168,7 @@ static int clkgena_divmux_set_parent(struct clk_hw *hw, u8 index)
return 0;
}

-unsigned long clkgena_divmux_recalc_rate(struct clk_hw *hw,
+static unsigned long clkgena_divmux_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clkgena_divmux *genamux = to_clkgena_divmux(hw);
@@ -215,7 +215,7 @@ static const struct clk_ops clkgena_divmux_ops = {
/**
* clk_register_genamux - register a genamux clock with the clock framework
*/
-struct clk *clk_register_genamux(const char *name,
+static struct clk *clk_register_genamux(const char *name,
const char **parent_names, u8 num_parents,
void __iomem *reg,
const struct clkgena_divmux_data *muxdata,
@@ -385,7 +385,7 @@ static void __iomem * __init clkgen_get_register_base(
return reg;
}

-void __init st_of_clkgena_divmux_setup(struct device_node *np)
+static void __init st_of_clkgena_divmux_setup(struct device_node *np)
{
const struct of_device_id *match;
const struct clkgena_divmux_data *data;
@@ -485,7 +485,7 @@ static const struct of_device_id clkgena_prediv_of_match[] = {
{}
};

-void __init st_of_clkgena_prediv_setup(struct device_node *np)
+static void __init st_of_clkgena_prediv_setup(struct device_node *np)
{
const struct of_device_id *match;
void __iomem *reg;
@@ -622,7 +622,7 @@ static const struct of_device_id mux_of_match[] = {
{}
};

-void __init st_of_clkgen_mux_setup(struct device_node *np)
+static void __init st_of_clkgen_mux_setup(struct device_node *np)
{
const struct of_device_id *match;
struct clk *clk;
@@ -699,7 +699,7 @@ static const struct of_device_id vcc_of_match[] = {
{}
};

-void __init st_of_clkgen_vcc_setup(struct device_node *np)
+static void __init st_of_clkgen_vcc_setup(struct device_node *np)
{
const struct of_device_id *match;
void __iomem *reg;
diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
index d204ba85db3a..106532207213 100644
--- a/drivers/clk/st/clkgen-pll.c
+++ b/drivers/clk/st/clkgen-pll.c
@@ -270,7 +270,7 @@ static int clkgen_pll_is_enabled(struct clk_hw *hw)
return !poweroff;
}

-unsigned long recalc_stm_pll800c65(struct clk_hw *hw,
+static unsigned long recalc_stm_pll800c65(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clkgen_pll *pll = to_clkgen_pll(hw);
@@ -297,7 +297,7 @@ unsigned long recalc_stm_pll800c65(struct clk_hw *hw,

}

-unsigned long recalc_stm_pll1600c65(struct clk_hw *hw,
+static unsigned long recalc_stm_pll1600c65(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clkgen_pll *pll = to_clkgen_pll(hw);
@@ -321,7 +321,7 @@ unsigned long recalc_stm_pll1600c65(struct clk_hw *hw,
return rate;
}

-unsigned long recalc_stm_pll3200c32(struct clk_hw *hw,
+static unsigned long recalc_stm_pll3200c32(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clkgen_pll *pll = to_clkgen_pll(hw);
@@ -343,7 +343,7 @@ unsigned long recalc_stm_pll3200c32(struct clk_hw *hw,
return rate;
}

-unsigned long recalc_stm_pll1200c32(struct clk_hw *hw,
+static unsigned long recalc_stm_pll1200c32(struct clk_hw *hw,
unsigned long parent_rate)
{
struct clkgen_pll *pll = to_clkgen_pll(hw);
@@ -544,7 +544,7 @@ CLK_OF_DECLARE(clkgena_c65_plls,
"st,clkgena-plls-c65", clkgena_c65_pll_setup);

static struct clk * __init clkgen_odf_register(const char *parent_name,
- void * __iomem reg,
+ void __iomem *reg,
struct clkgen_pll_data *pll_data,
int odf,
spinlock_t *odf_lock,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:44:09

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 13/19] clk: ti: Silence sparse warnings

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 <[email protected]>
Cc: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
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,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:42:55

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 14/19] clk: versatile: Silence sparse warnings

drivers/clk/versatile/clk-sp810.c:159:29: error: incompatible types for operation (<=)
drivers/clk/versatile/clk-sp810.c:159:29: left side has type char const *<noident>
drivers/clk/versatile/clk-sp810.c:159:29: right side has type int
drivers/clk/versatile/clk-sp810.c:159:53: error: incompatible types for operation (<=)
drivers/clk/versatile/clk-sp810.c:159:53: left side has type char const *<noident>
drivers/clk/versatile/clk-sp810.c:159:53: right side has type int
rivers/clk/versatile/clk-sp810.c:138:13: warning: symbol 'clk_sp810_of_setup' was not declared. Should it be static?

Cc: Pawel Moll <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/versatile/clk-sp810.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index c6e86a9a2aa3..a96dd8e53fdb 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -135,7 +135,7 @@ static struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
return sp810->timerclken[clkspec->args[0]].clk;
}

-void __init clk_sp810_of_setup(struct device_node *node)
+static void __init clk_sp810_of_setup(struct device_node *node)
{
struct clk_sp810 *sp810 = kzalloc(sizeof(*sp810), GFP_KERNEL);
const char *parent_names[2];
@@ -156,7 +156,7 @@ void __init clk_sp810_of_setup(struct device_node *node)
"timclk");
parent_names[1] = of_clk_get_parent_name(node, sp810->timclk_index);

- if (parent_names[0] <= 0 || parent_names[1] <= 0) {
+ if (!parent_names[0] || !parent_names[1]) {
pr_warn("Failed to obtain parent clocks for SP810!\n");
return;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:42:51

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 15/19] clk: socfpga: Silence sparse warning

drivers/clk/socfpga/clk-periph.c:79:39: warning: Using plain integer as NULL pointer

Cc: Dinh Nguyen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/socfpga/clk-periph.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/socfpga/clk-periph.c b/drivers/clk/socfpga/clk-periph.c
index 46531c34ec9b..83aeaa219d14 100644
--- a/drivers/clk/socfpga/clk-periph.c
+++ b/drivers/clk/socfpga/clk-periph.c
@@ -76,7 +76,7 @@ static __init void __socfpga_periph_init(struct device_node *node,
periph_clk->shift = div_reg[1];
periph_clk->width = div_reg[2];
} else {
- periph_clk->div_reg = 0;
+ periph_clk->div_reg = NULL;
}

rc = of_property_read_u32(node, "fixed-divider", &fixed_div);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:42:49

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 16/19] clk: mmp: Silence sparse warnings

drivers/clk/mmp/clk-apbc.c:118:16: warning: symbol 'clk_apbc_ops' was not declared. Should it be static?
drivers/clk/mmp/clk-apmu.c:64:16: warning: symbol 'clk_apmu_ops' was not declared. Should it be static?

Cc: Chao Xie <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/mmp/clk-apbc.c | 2 +-
drivers/clk/mmp/clk-apmu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mmp/clk-apbc.c b/drivers/clk/mmp/clk-apbc.c
index d14120eaa71f..09d41c717c52 100644
--- a/drivers/clk/mmp/clk-apbc.c
+++ b/drivers/clk/mmp/clk-apbc.c
@@ -115,7 +115,7 @@ static void clk_apbc_unprepare(struct clk_hw *hw)
spin_unlock_irqrestore(apbc->lock, flags);
}

-struct clk_ops clk_apbc_ops = {
+static struct clk_ops clk_apbc_ops = {
.prepare = clk_apbc_prepare,
.unprepare = clk_apbc_unprepare,
};
diff --git a/drivers/clk/mmp/clk-apmu.c b/drivers/clk/mmp/clk-apmu.c
index abe182b2377f..cdcf2d7f321e 100644
--- a/drivers/clk/mmp/clk-apmu.c
+++ b/drivers/clk/mmp/clk-apmu.c
@@ -61,7 +61,7 @@ static void clk_apmu_disable(struct clk_hw *hw)
spin_unlock_irqrestore(apmu->lock, flags);
}

-struct clk_ops clk_apmu_ops = {
+static struct clk_ops clk_apmu_ops = {
.enable = clk_apmu_enable,
.disable = clk_apmu_disable,
};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:42:46

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 17/19] clk: xgene: Silence sparse warnings

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 <[email protected]>
---
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, &reg,
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, &reg,
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

2015-05-06 07:42:40

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 18/19] clk: moxart: Silence sparse warnings

drivers/clk/clk-moxart.c:18:13: warning: symbol 'moxart_of_pll_clk_init' was not declared. Should it be static?
drivers/clk/clk-moxart.c:56:13: warning: symbol 'moxart_of_apb_clk_init' was not declared. Should it be static?

Cc: Jonas Jensen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-moxart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-moxart.c b/drivers/clk/clk-moxart.c
index 30a3b6999e10..5181b89c3cb2 100644
--- a/drivers/clk/clk-moxart.c
+++ b/drivers/clk/clk-moxart.c
@@ -15,7 +15,7 @@
#include <linux/of_address.h>
#include <linux/clkdev.h>

-void __init moxart_of_pll_clk_init(struct device_node *node)
+static void __init moxart_of_pll_clk_init(struct device_node *node)
{
static void __iomem *base;
struct clk *clk, *ref_clk;
@@ -53,7 +53,7 @@ void __init moxart_of_pll_clk_init(struct device_node *node)
CLK_OF_DECLARE(moxart_pll_clock, "moxa,moxart-pll-clock",
moxart_of_pll_clk_init);

-void __init moxart_of_apb_clk_init(struct device_node *node)
+static void __init moxart_of_apb_clk_init(struct device_node *node)
{
static void __iomem *base;
struct clk *clk, *pll_clk;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 07:42:38

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 19/19] clk: u300: Silence sparse warnings

drivers/clk/clk-u300.c:1175:13: warning: symbol 'u300_clk_init' was not declared. Should it be static?

Cc: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-u300.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-u300.c b/drivers/clk/clk-u300.c
index 406bfc1375b2..18bf5e576b93 100644
--- a/drivers/clk/clk-u300.c
+++ b/drivers/clk/clk-u300.c
@@ -12,6 +12,7 @@
#include <linux/clk-provider.h>
#include <linux/spinlock.h>
#include <linux/of.h>
+#include <linux/platform_data/clk-u300.h>

/* APP side SYSCON registers */
/* CLK Control Register 16bit (R/W) */
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-05-06 08:15:25

by Peter Ujfalusi

[permalink] [raw]
Subject: Re: [PATCH 13/19] clk: ti: Silence sparse warnings

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 <[email protected]>
> Cc: Tero Kristo <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Peter Ujfalusi <[email protected]>

> ---
> 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

2015-05-06 08:55:48

by zhangfei

[permalink] [raw]
Subject: Re: [PATCH 07/19] clk: hix5hd2: Silence sparse warnings



On 05/06/2015 03:39 PM, Stephen Boyd wrote:
> drivers/clk/hisilicon/clk-hix5hd2.c:255:13: warning: symbol 'hix5hd2_clk_register_complex' was not declared. Should it be static?
>
> Cc: Zhangfei Gao <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Zhangfei Gao <[email protected]>

Thanks

> ---
> drivers/clk/hisilicon/clk-hix5hd2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c
> index f1d239435826..78bd95b6fc7b 100644
> --- a/drivers/clk/hisilicon/clk-hix5hd2.c
> +++ b/drivers/clk/hisilicon/clk-hix5hd2.c
> @@ -252,8 +252,9 @@ static struct clk_ops clk_complex_ops = {
> .disable = clk_complex_disable,
> };
>
> -void __init hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks,
> - int nums, struct hisi_clock_data *data)
> +static void __init
> +hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks, int nums,
> + struct hisi_clock_data *data)
> {
> void __iomem *base = data->base;
> int i;
>

2015-05-06 09:23:29

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH 03/19] clk: max-gen: Silence sparse warnings

Hello Stephen,

On 05/06/2015 09:39 AM, Stephen Boyd wrote:
> drivers/clk/clk-max-gen.c:82:16: warning: symbol 'max_gen_clk_ops' was not declared. Should it be static?
> drivers/clk/clk-max-gen.c:109:5: warning: symbol 'max_gen_clk_probe' was not declared. Should it be static?
> drivers/clk/clk-max-gen.c:183:5: warning: symbol 'max_gen_clk_remove' was not declared. Should it be static?
>
> Cc: Javier Martinez Canillas <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/clk-max-gen.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/clk-max-gen.c b/drivers/clk/clk-max-gen.c
> index 6505049d50f1..35af9cb6da4f 100644
> --- a/drivers/clk/clk-max-gen.c
> +++ b/drivers/clk/clk-max-gen.c
> @@ -31,6 +31,8 @@
> #include <linux/of.h>
> #include <linux/export.h>
>
> +#include "clk-max-gen.h"
> +
> struct max_gen_clk {
> struct regmap *regmap;
> u32 mask;
>

Looks good to me.

Acked-by: Javier Martinez Canillas <[email protected]>

Best regards,
Javier

2015-05-06 10:31:47

by Pawel Moll

[permalink] [raw]
Subject: Re: [PATCH 14/19] clk: versatile: Silence sparse warnings

On Wed, 2015-05-06 at 08:39 +0100, Stephen Boyd wrote:
> drivers/clk/versatile/clk-sp810.c:159:29: error: incompatible types for operation (<=)
> drivers/clk/versatile/clk-sp810.c:159:29: left side has type char const *<noident>
> drivers/clk/versatile/clk-sp810.c:159:29: right side has type int
> drivers/clk/versatile/clk-sp810.c:159:53: error: incompatible types for operation (<=)
> drivers/clk/versatile/clk-sp810.c:159:53: left side has type char const *<noident>
> drivers/clk/versatile/clk-sp810.c:159:53: right side has type int
> rivers/clk/versatile/clk-sp810.c:138:13: warning: symbol 'clk_sp810_of_setup' was not declared. Should it be static?
>
> Cc: Pawel Moll <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Pawel Moll <[email protected]>

> @@ -156,7 +156,7 @@ void __init clk_sp810_of_setup(struct device_node *node)
> "timclk");
> parent_names[1] = of_clk_get_parent_name(node, sp810->timclk_index);
>
> - if (parent_names[0] <= 0 || parent_names[1] <= 0) {
> + if (!parent_names[0] || !parent_names[1]) {
> pr_warn("Failed to obtain parent clocks for SP810!\n");
> return;
> }

I stared at it (and at git blame output) and was thinking what was I
smoking typing the code... Fortunately mail history suggest that I had
"!parent..." in my original patch, and it was modified by Mike ;-) No
harm done :-)

Thanks for fixing this!

Pawel

2015-05-06 10:53:35

by Sylwester Nawrocki

[permalink] [raw]
Subject: Re: [PATCH 08/19] clk: samsung: Silence sparse warnings

On 06/05/15 09:39, Stephen Boyd wrote:
> drivers/clk/samsung/clk-exynos5260.c:138:40: warning: Using plain integer as NULL pointer

> Cc: Sylwester Nawrocki <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/samsung/clk-exynos5260.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
> index df1d83c45554..06f96eb7cf93 100644
> --- a/drivers/clk/samsung/clk-exynos5260.c
> +++ b/drivers/clk/samsung/clk-exynos5260.c
> @@ -135,7 +135,7 @@ static struct samsung_gate_clock aud_gate_clks[] __initdata = {
>
> static void __init exynos5260_clk_aud_init(struct device_node *np)
> {
> - struct samsung_cmu_info cmu = {0};
> + struct samsung_cmu_info cmu = { NULL };

I'd vote for an empty initializer list, anyway, thanks for
correcting that.

Acked-by: Sylwester Nawrocki <[email protected]>

--
Thanks,
Sylwester

2015-05-06 13:22:04

by Alex Elder

[permalink] [raw]
Subject: Re: [PATCH 04/19] clk: bcm/kona: Silence sparse warnings

On 05/06/2015 02:39 AM, Stephen Boyd wrote:
> drivers/clk/bcm/clk-kona.c:1243:16: warning: odd constant _Bool cast (ffffffffffffffea becomes 1)
>
> Cc: Alex Elder <[email protected]>
> Cc: Tim Kryger <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Looks good.
Reviewed-by: Alex Elder <[email protected]>

> ---
> drivers/clk/bcm/clk-kona.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/bcm/clk-kona.c b/drivers/clk/bcm/clk-kona.c
> index a0ef4f75d457..79a98506c433 100644
> --- a/drivers/clk/bcm/clk-kona.c
> +++ b/drivers/clk/bcm/clk-kona.c
> @@ -1240,7 +1240,7 @@ static bool __kona_clk_init(struct kona_clk *bcm_clk)
> default:
> BUG();
> }
> - return -EINVAL;
> + return false;
> }
>
> /* Set a CCU and all its clocks into their desired initial state */
>

2015-05-06 13:23:40

by Alex Elder

[permalink] [raw]
Subject: Re: [PATCH 05/19] clk: bcm/kona: Remove ccu_list

On 05/06/2015 02:39 AM, Stephen Boyd wrote:
> This list doesn't look to be used. Let's remove it and any
> associated code that would be manipulating this list. This also
> silences this error:
>
> drivers/clk/bcm/clk-kona-setup.c:24:1: warning: symbol 'ccu_list' was not declared. Should it be static?

It should have been static. And I thought it would be used
but it's not, so I agree, it's not serving any real purpose.

Reviewed-by: Alex Elder <[email protected]>

> Cc: Alex Elder <[email protected]>
> Cc: Tim Kryger <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/bcm/clk-kona-setup.c | 4 ----
> drivers/clk/bcm/clk-kona.h | 2 --
> 2 files changed, 6 deletions(-)
>
> diff --git a/drivers/clk/bcm/clk-kona-setup.c b/drivers/clk/bcm/clk-kona-setup.c
> index e5aededdd322..deaa7f962b84 100644
> --- a/drivers/clk/bcm/clk-kona-setup.c
> +++ b/drivers/clk/bcm/clk-kona-setup.c
> @@ -21,8 +21,6 @@
> #define selector_clear_exists(sel) ((sel)->width = 0)
> #define trigger_clear_exists(trig) FLAG_CLEAR(trig, TRIG, EXISTS)
>
> -LIST_HEAD(ccu_list); /* The list of set up CCUs */
> -
> /* Validity checking */
>
> static bool ccu_data_offsets_valid(struct ccu_data *ccu)
> @@ -773,7 +771,6 @@ static void kona_ccu_teardown(struct ccu_data *ccu)
>
> of_clk_del_provider(ccu->node); /* safe if never added */
> ccu_clks_teardown(ccu);
> - list_del(&ccu->links);
> of_node_put(ccu->node);
> ccu->node = NULL;
> iounmap(ccu->base);
> @@ -847,7 +844,6 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu,
> goto out_err;
> }
> ccu->node = of_node_get(node);
> - list_add_tail(&ccu->links, &ccu_list);
>
> /*
> * Set up each defined kona clock and save the result in
> diff --git a/drivers/clk/bcm/clk-kona.h b/drivers/clk/bcm/clk-kona.h
> index 6849a64baf6d..906576ec97b6 100644
> --- a/drivers/clk/bcm/clk-kona.h
> +++ b/drivers/clk/bcm/clk-kona.h
> @@ -480,7 +480,6 @@ struct ccu_data {
> spinlock_t lock; /* serialization lock */
> bool write_enabled; /* write access is currently enabled */
> struct ccu_policy policy;
> - struct list_head links; /* for ccu_list */
> struct device_node *node;
> struct clk_onecell_data clk_data;
> const char *name;
> @@ -492,7 +491,6 @@ struct ccu_data {
> #define KONA_CCU_COMMON(_prefix, _name, _ccuname) \
> .name = #_name "_ccu", \
> .lock = __SPIN_LOCK_UNLOCKED(_name ## _ccu_data.lock), \
> - .links = LIST_HEAD_INIT(_name ## _ccu_data.links), \
> .clk_data = { \
> .clk_num = _prefix ## _ ## _ccuname ## _CCU_CLOCK_COUNT, \
> }
>

2015-05-06 22:28:44

by Sebastian Hesselbarth

[permalink] [raw]
Subject: Re: [PATCH 06/19] clk: berlin: Silence sparse warning

On 06.05.2015 09:39, Stephen Boyd wrote:
> drivers/clk/berlin/berlin2-pll.c:94:12: warning: symbol 'berlin2_pll_register' was not declared. Should it be static?
>
> Cc: Alexandre Belloni <[email protected]>
> Cc: Sebastian Hesselbarth <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Sebastian Hesselbarth <[email protected]>

Thanks!

> ---
> drivers/clk/berlin/berlin2-pll.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
> index bdc506b03824..f4b8d324b083 100644
> --- a/drivers/clk/berlin/berlin2-pll.c
> +++ b/drivers/clk/berlin/berlin2-pll.c
> @@ -25,14 +25,7 @@
> #include <asm/div64.h>
>
> #include "berlin2-div.h"
> -
> -struct berlin2_pll_map {
> - const u8 vcodiv[16];
> - u8 mult;
> - u8 fbdiv_shift;
> - u8 rfdiv_shift;
> - u8 divsel_shift;
> -};
> +#include "berlin2-pll.h"
>
> struct berlin2_pll {
> struct clk_hw hw;
>

2015-05-07 04:36:15

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH 09/19] clk: emev2: Silence sparse warnings

On Wed, May 06, 2015 at 12:39:46AM -0700, Stephen Boyd wrote:
> drivers/clk/shmobile/clk-emev2.c:37:14: warning: symbol 'smu_base' was not declared. Should it be static?
>
> Cc: Takashi Yoshii <[email protected]>
> Cc: Magnus Damm <[email protected]>
> Cc: Simon Horman <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Simon Horman <[email protected]>

Stephen, I'm assuming that you or Mike will merge this.

> ---
> drivers/clk/shmobile/clk-emev2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/shmobile/clk-emev2.c b/drivers/clk/shmobile/clk-emev2.c
> index 6c7c929c7765..5b60beb7d0eb 100644
> --- a/drivers/clk/shmobile/clk-emev2.c
> +++ b/drivers/clk/shmobile/clk-emev2.c
> @@ -34,7 +34,7 @@
> static DEFINE_SPINLOCK(lock);
>
> /* not pretty, but hey */
> -void __iomem *smu_base;
> +static void __iomem *smu_base;
>
> static void __init emev2_smu_write(unsigned long value, int offs)
> {
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>

2015-05-07 05:17:30

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 09/19] clk: emev2: Silence sparse warnings

On 05/07, Simon Horman wrote:
> On Wed, May 06, 2015 at 12:39:46AM -0700, Stephen Boyd wrote:
> > drivers/clk/shmobile/clk-emev2.c:37:14: warning: symbol 'smu_base' was not declared. Should it be static?
> >
> > Cc: Takashi Yoshii <[email protected]>
> > Cc: Magnus Damm <[email protected]>
> > Cc: Simon Horman <[email protected]>
> > Signed-off-by: Stephen Boyd <[email protected]>
>
> Acked-by: Simon Horman <[email protected]>
>
> Stephen, I'm assuming that you or Mike will merge this.

Yep we'll take this series through clk-next. Thanks.

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

2015-05-07 05:31:52

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH 09/19] clk: emev2: Silence sparse warnings

On Wed, May 06, 2015 at 10:17:24PM -0700, Stephen Boyd wrote:
> On 05/07, Simon Horman wrote:
> > On Wed, May 06, 2015 at 12:39:46AM -0700, Stephen Boyd wrote:
> > > drivers/clk/shmobile/clk-emev2.c:37:14: warning: symbol 'smu_base' was not declared. Should it be static?
> > >
> > > Cc: Takashi Yoshii <[email protected]>
> > > Cc: Magnus Damm <[email protected]>
> > > Cc: Simon Horman <[email protected]>
> > > Signed-off-by: Stephen Boyd <[email protected]>
> >
> > Acked-by: Simon Horman <[email protected]>
> >
> > Stephen, I'm assuming that you or Mike will merge this.
>
> Yep we'll take this series through clk-next. Thanks.

Great, thanks.

2015-05-07 08:16:03

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCH 13/19] clk: ti: Silence sparse warnings

On 05/06/2015 11:15 AM, Peter Ujfalusi wrote:
> 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 <[email protected]>
>> Cc: Tero Kristo <[email protected]>
>> Signed-off-by: Stephen Boyd <[email protected]>
>
> Acked-by: Peter Ujfalusi <[email protected]>

Yes looks good to me also.

Acked-by: Tero Kristo <[email protected]>

>
>> ---
>> 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,
>>
>
>

2015-05-12 10:38:49

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 19/19] clk: u300: Silence sparse warnings

On Wed, May 6, 2015 at 9:39 AM, Stephen Boyd <[email protected]> wrote:

> drivers/clk/clk-u300.c:1175:13: warning: symbol 'u300_clk_init' was not declared. Should it be static?
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij