Skip to contentSkip to conversation

clk: bcm2835: Remove duplicate inclusion of clk-provider.h

PATCH RESEND New Sachin Kamat 4 participants 22 messages Oct 8, 2013 – Dec 23, 2013

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/10 clk: bcm2835: Remove duplicate inclusion of clk-provider.h

clk-provider.h was included twice.

---
Added all the acquired acks to respective patches.

---
 drivers/clk/clk-bcm2835.c |    1 -
 1 file changed, 1 deletion(-)
drivers/clk/clk-bcm2835.c +0 -1
index 5fb4ff5..676077d 100644
@@ -20,7 +20,6 @@
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 
 static const struct of_device_id clk_match[] __initconst = {
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH RESEND 1/10 clk: bcm2835: Remove duplicate inclusion of clk-provider.h

Quoted 22 lines · Sachin Kamat

clk-provider.h was included twice.

---
Added all the acquired acks to respective patches.

---
 drivers/clk/clk-bcm2835.c |    1 -
 1 file changed, 1 deletion(-)
drivers/clk/clk-bcm2835.c +0 -2
index 5fb4ff5..676077d 100644
@@ -20,7 +20,6 @@
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 
 static const struct of_device_id clk_match[] __initconst = {
--
Quoted 2 lines

1.7.9.5

Mike,

Any chance getting this series picked up?

Signature · 2 lines
With warm regards,
Sachin
#2 lore raw

PATCH RESEND 1/10 clk: bcm2835: Remove duplicate inclusion of clk-provider.h

Quoting Sachin Kamat (2013-12-05 03:27:15)

Quoted 21 lines · Sachin Kamat
Quoted 20 lines

clk-provider.h was included twice.

---
Added all the acquired acks to respective patches.

---
 drivers/clk/clk-bcm2835.c |    1 -
 1 file changed, 1 deletion(-)
drivers/clk/clk-bcm2835.c +0 -1
index 5fb4ff5..676077d 100644
@@ -20,7 +20,6 @@
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/clk/bcm2835.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 
Quoted 8 lines
Quoted 4 lines
drivers/clk/clk-bcm2835.c +0 -1
 static const struct of_device_id clk_match[] __initconst = {
--

1.7.9.5

Mike,

Any chance getting this series picked up?

Thanks for re-ping me on this! Taken into clk-next.

Regards,
Mike

Quoted 4 lines
Signature · 3 lines
-- 
With warm regards,
Sachin
#3 lore raw

PATCH RESEND 1/10 clk: bcm2835: Remove duplicate inclusion of clk-provider.h

Quoted 6 lines · Mike Turquette
Quoted 4 lines

Mike,

Any chance getting this series picked up?

Thanks for re-ping me on this! Taken into clk-next.

Thanks Mike. But the below patch seems missing in your tree.
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/271627

Signature · 2 lines
With warm regards,
Sachin
#4 lore raw

PATCH RESEND 1/10 clk: bcm2835: Remove duplicate inclusion of clk-provider.h

Quoting Sachin Kamat (2013-12-19 19:58:24)

Quoted 10 lines · Mike Turquette
Quoted 6 lines
Quoted 4 lines

Mike,

Any chance getting this series picked up?

Thanks for re-ping me on this! Taken into clk-next.

Thanks Mike. But the below patch seems missing in your tree.
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/271627

Oops. Strange. Thanks for the catch. Applied.

Regards,
Mike

Quoted 4 lines
Signature · 3 lines
-- 
With warm regards,
Sachin
#5 lore raw

PATCH 2/10 clk: SPEAr: Staticize clk_frac_ops

In reply to Sachin Kamat

clk_frac_ops is local to this file. Make it static.

---
 drivers/clk/spear/clk-frac-synth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/spear/clk-frac-synth.c +1 -1
index 958aa3a..dffd4ce 100644
@@ -116,7 +116,7 @@ static int clk_frac_set_rate(struct clk_hw *hw, unsigned long drate,
 	return 0;
 }
 
-struct clk_ops clk_frac_ops = {
+static struct clk_ops clk_frac_ops = {
 	.recalc_rate = clk_frac_recalc_rate,
 	.round_rate = clk_frac_round_rate,
 	.set_rate = clk_frac_set_rate,
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

In reply to Sachin Kamat

Local variables used only in this file are made static.

Cc Stephen Warren <[email protected]>
---
 drivers/clk/tegra/clk-pll.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/clk/tegra/clk-pll.c +5 -5
index 197074a..76ed452 100644
@@ -1340,7 +1340,7 @@ struct clk *tegra_clk_register_plle(const char *name, const char *parent_name,
 }
 
 #ifdef CONFIG_ARCH_TEGRA_114_SOC
-const struct clk_ops tegra_clk_pllxc_ops = {
+static const struct clk_ops tegra_clk_pllxc_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1349,7 +1349,7 @@ const struct clk_ops tegra_clk_pllxc_ops = {
 	.set_rate = clk_pllxc_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllm_ops = {
+static const struct clk_ops tegra_clk_pllm_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1358,7 +1358,7 @@ const struct clk_ops tegra_clk_pllm_ops = {
 	.set_rate = clk_pllm_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllc_ops = {
+static const struct clk_ops tegra_clk_pllc_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pllc_enable,
 	.disable = clk_pllc_disable,
@@ -1367,7 +1367,7 @@ const struct clk_ops tegra_clk_pllc_ops = {
 	.set_rate = clk_pllc_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllre_ops = {
+static const struct clk_ops tegra_clk_pllre_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1376,7 +1376,7 @@ const struct clk_ops tegra_clk_pllre_ops = {
 	.set_rate = clk_pllre_set_rate,
 };
 
-const struct clk_ops tegra_clk_plle_tegra114_ops = {
+static const struct clk_ops tegra_clk_plle_tegra114_ops = {
 	.is_enabled =  clk_pll_is_enabled,
 	.enable = clk_plle_tegra114_enable,
 	.disable = clk_plle_tegra114_disable,
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

This might conflict with some of the cod re-org patches that Peter has sent. Peter, can you please check. If it does, Peter may as well roll this into his repost of all the Tegra clock patches...

#8 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

Cheers,

Peter.

#9 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 8 lines · Peter De Schrijver
Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

I forget exactly which symbols this patch changed, but presumably they're only exported via pointers rather than by symbol name, and isn't that exactly what static is for?

#10 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 6 lines · Stephen Warren
Quoted 5 lines · Peter De Schrijver
Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Quoted 7 lines
Quoted 3 lines

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

I forget exactly which symbols this patch changed, but presumably they're only exported via pointers rather than by symbol name, and isn't that exactly what static is for?

They are indeed exported using a pointer. depends on how you look at it I guess, but I see static as 'local to this file only' which isn't really true if you hand out pointers to others.

Cheers,

Peter.

#11 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 11 lines · Peter De Schrijver
Quoted 10 lines · Stephen Warren
Quoted 8 lines · Peter De Schrijver
Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

Quoted 7 lines
Quoted 3 lines

I forget exactly which symbols this patch changed, but presumably they're only exported via pointers rather than by symbol name, and isn't that exactly what static is for?

They are indeed exported using a pointer. depends on how you look at it I guess, but I see static as 'local to this file only' which isn't really true if you hand out pointers to others.

Yes, static specifically means "the symbol name is local to this file". It says nothing about the data behind the symbol name.

#12 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 16 lines · Stephen Warren
Quoted 15 lines · Peter De Schrijver
Quoted 13 lines · Stephen Warren
Quoted 8 lines · Peter De Schrijver
Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

I forget exactly which symbols this patch changed, but presumably they're only exported via pointers rather than by symbol name, and isn't that exactly what static is for?

Quoted 6 lines
Quoted 3 lines

They are indeed exported using a pointer. depends on how you look at it I guess, but I see static as 'local to this file only' which isn't really true if you hand out pointers to others.

Yes, static specifically means "the symbol name is local to this file". It says nothing about the data behind the symbol name.

I would still prefer the symbol visibility to have some relation with how the data is used.

#13 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

Quoted 21 lines · Peter De Schrijver
Quoted 20 lines · Stephen Warren
Quoted 18 lines · Peter De Schrijver
Quoted 6 lines · Stephen Warren
Quoted 5 lines · Peter De Schrijver
Quoted 3 lines · Stephen Warren
Quoted 1 line · Sachin Kamat

Local variables used only in this file are made static.

Quoted 7 lines
Quoted 3 lines

Conceptually they are still exported. So I think it's counterintuitive to declare them static. Unless you expect namespace problems, I would rather leave it as is.

I forget exactly which symbols this patch changed, but presumably they're only exported via pointers rather than by symbol name, and isn't that exactly what static is for?

They are indeed exported using a pointer. depends on how you look at it I guess, but I see static as 'local to this file only' which isn't really true if you hand out pointers to others.

Quoted 5 lines
Quoted 2 lines

Yes, static specifically means "the symbol name is local to this file". It says nothing about the data behind the symbol name.

I would still prefer the symbol visibility to have some relation with how the data is used.

No, if the *symbol* is not used, it should be static. There's absolutely zero benefit from having a visible symbol if it isn't used.

#14 lore raw

PATCH 3/10 clk: tegra: Staticize local variables in clk-pll.c

In reply to Sachin Kamat

Quoting Sachin Kamat (2013-10-08 04:17:41)

Quoted 4 lines

Local variables used only in this file are made static.

Cc Stephen Warren <[email protected]>

I updated this patch to staticize tegra_clk_pllxc_ops after taking Peter's Tegra pull request. Refreshed patch has been applied to clk-next and a copy is found below. Let me know if you have any comments.

Regards,
Mike

From: Sachin Kamat <[email protected]>
Date: Tue, 8 Oct 2013 16:47:41 +0530
Subject: [PATCH] clk: tegra: Staticize local variables in clk-pll.c

Local variables used only in this file are made static.

Cc Stephen Warren <[email protected]>
[mturquette at linaro.org: staticize struct clk_ops tegra_clk_pllxc_ops]
---
 drivers/clk/tegra/clk-pll.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/clk/tegra/clk-pll.c +6 -6
index 2dd4322..0d20241 100644
@@ -1433,7 +1433,7 @@ struct clk *tegra_clk_register_plle(const char *name, const char *parent_name,
 }
 
 #if defined(CONFIG_ARCH_TEGRA_114_SOC) || defined(CONFIG_ARCH_TEGRA_124_SOC)
-const struct clk_ops tegra_clk_pllxc_ops = {
+static const struct clk_ops tegra_clk_pllxc_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1442,7 +1442,7 @@ const struct clk_ops tegra_clk_pllxc_ops = {
 	.set_rate = clk_pllxc_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllm_ops = {
+static const struct clk_ops tegra_clk_pllm_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1451,7 +1451,7 @@ const struct clk_ops tegra_clk_pllm_ops = {
 	.set_rate = clk_pllm_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllc_ops = {
+static const struct clk_ops tegra_clk_pllc_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pllc_enable,
 	.disable = clk_pllc_disable,
@@ -1460,7 +1460,7 @@ const struct clk_ops tegra_clk_pllc_ops = {
 	.set_rate = clk_pllc_set_rate,
 };
 
-const struct clk_ops tegra_clk_pllre_ops = {
+static const struct clk_ops tegra_clk_pllre_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
@@ -1469,7 +1469,7 @@ const struct clk_ops tegra_clk_pllre_ops = {
 	.set_rate = clk_pllre_set_rate,
 };
 
-const struct clk_ops tegra_clk_plle_tegra114_ops = {
+static const struct clk_ops tegra_clk_plle_tegra114_ops = {
 	.is_enabled =  clk_pll_is_enabled,
 	.enable = clk_plle_tegra114_enable,
 	.disable = clk_plle_tegra114_disable,
@@ -1731,7 +1731,7 @@ struct clk *tegra_clk_register_plle_tegra114(const char *name,
 #endif
 
 #ifdef CONFIG_ARCH_TEGRA_124_SOC
-const struct clk_ops tegra_clk_pllss_ops = {
+static const struct clk_ops tegra_clk_pllss_ops = {
 	.is_enabled = clk_pll_is_enabled,
 	.enable = clk_pll_iddq_enable,
 	.disable = clk_pll_iddq_disable,
Signature · 1 line
1.8.3.2
#15 lore raw

PATCH 4/10 clk: tegra: Staticize tegra_clk_periph_nodiv_ops

In reply to Sachin Kamat

tegra_clk_periph_nodiv_ops is used only in this file. Make it static.

---
 drivers/clk/tegra/clk-periph.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/tegra/clk-periph.c +1 -1
index b2309d3..2c0bfa2 100644
@@ -162,7 +162,7 @@ const struct clk_ops tegra_clk_periph_ops = {
 	.disable = clk_periph_disable,
 };
 
-const struct clk_ops tegra_clk_periph_nodiv_ops = {
+static const struct clk_ops tegra_clk_periph_nodiv_ops = {
 	.get_parent = clk_periph_get_parent,
 	.set_parent = clk_periph_set_parent,
 	.is_enabled = clk_periph_is_enabled,
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH 5/10 clk: socfpga: Use NULL instead of 0

In reply to Sachin Kamat

'div_reg' is a pointer. Assign NULL instead of 0.

---
 drivers/clk/socfpga/clk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/socfpga/clk.c +1 -1
index 5bb848c..454ddc1 100644
@@ -292,7 +292,7 @@ static void __init socfpga_gate_clk_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;
 	}
 
 	of_property_read_string(node, "clock-output-names", &clk_name);
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 6/10 clk: versatile: Staticize clk_sp810_timerclken_of_get

In reply to Sachin Kamat

clk_sp810_timerclken_of_get is used only in this file. Make it static.

---
 drivers/clk/versatile/clk-sp810.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/versatile/clk-sp810.c +1 -1
index bf9b15a..c6e86a9 100644
@@ -123,7 +123,7 @@ static const struct clk_ops clk_sp810_timerclken_ops = {
 	.set_parent = clk_sp810_timerclken_set_parent,
 };
 
-struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
+static struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
 		void *data)
 {
 	struct clk_sp810 *sp810 = data;
Signature · 1 line
1.7.9.5
#18 lore raw

PATCH 7/10 clk: mvebu: Staticize of_cpu_clk_setup

In reply to Sachin Kamat

'of_cpu_clk_setup' is used only in this file. Make it static.

---
 drivers/clk/mvebu/clk-cpu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mvebu/clk-cpu.c +1 -1
index 1466865..8ebf757 100644
@@ -101,7 +101,7 @@ static const struct clk_ops cpu_ops = {
 	.set_rate = clk_cpu_set_rate,
 };
 
-void __init of_cpu_clk_setup(struct device_node *node)
+static void __init of_cpu_clk_setup(struct device_node *node)
 {
 	struct cpu_clk *cpuclk;
 	void __iomem *clock_complex_base = of_iomap(node, 0);
Signature · 1 line
1.7.9.5
#19 lore raw

PATCH 8/10 clk: vt8500: Staticize vtwm_pll_ops

In reply to Sachin Kamat

'vtwm_pll_ops' is local to this file. Make it static.

---
 drivers/clk/clk-vt8500.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-vt8500.c +1 -1
index 82306f5..a45e7a6 100644
@@ -620,7 +620,7 @@ static unsigned long vtwm_pll_recalc_rate(struct clk_hw *hw,
 	return pll_freq;
 }
 
-const struct clk_ops vtwm_pll_ops = {
+static const struct clk_ops vtwm_pll_ops = {
 	.round_rate = vtwm_pll_round_rate,
 	.set_rate = vtwm_pll_set_rate,
 	.recalc_rate = vtwm_pll_recalc_rate,
Signature · 1 line
1.7.9.5
#20 lore raw

PATCH 9/10 clk: ux500: Remove extra semicolon

In reply to Sachin Kamat

Extra semicolon is redundant. Remove it.

---
 drivers/clk/ux500/clk-prcmu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/ux500/clk-prcmu.c +1 -1
index 293a288..e2d63bc 100644
@@ -36,7 +36,7 @@ static int clk_prcmu_prepare(struct clk_hw *hw)
 	if (!ret)
 		clk->is_prepared = 1;
 
-	return ret;;
+	return ret;
 }
 
 static void clk_prcmu_unprepare(struct clk_hw *hw)
Signature · 1 line
1.7.9.5
#21 lore raw

PATCH 10/10 clk: max77686: Remove redundant break

In reply to Sachin Kamat

'break' after 'goto' is redundant. Remove it.

---
 drivers/clk/clk-max77686.c |    2 --
 1 file changed, 2 deletions(-)
drivers/clk/clk-max77686.c +0 -2
index 9f57bc3..b4a1a97 100644
@@ -157,11 +157,9 @@ static int max77686_clk_probe(struct platform_device *pdev)
 			case MAX77686_CLK_AP:
 				dev_err(&pdev->dev, "Fail to register CLK_AP\n");
 				goto err_clk_ap;
-				break;
 			case MAX77686_CLK_CP:
 				dev_err(&pdev->dev, "Fail to register CLK_CP\n");
 				goto err_clk_cp;
-				break;
 			case MAX77686_CLK_PMIC:
 				dev_err(&pdev->dev, "Fail to register CLK_PMIC\n");
 				goto err_clk_pmic;
Signature · 1 line
1.7.9.5