Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-13 Thread Stephen Boyd
On 03/12/15 20:29, Shawn Guo wrote: On Thu, Mar 12, 2015 at 12:43:40PM -0700, Stephen Boyd wrote: On 03/12/15 10:20, Sebastian Andrzej Siewior wrote: On 2015-02-17 14:01:04 [-0800], Stephen Boyd wrote: diff = --- arch/arm/mach-imx/mach-imx6q.c +++ /tmp/cocci-output-11792-b62223-mach-imx6q.c

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-13 Thread Sebastian Andrzej Siewior
Hi Shawn, On Fri, Mar 13, 2015 at 11:29:32AM +0800, Shawn Guo wrote: We did not add a DT property for it, because there was already enough info (clock configuration) in DT for kernel to figure it out. Correct. My understanding is whatever can be figured out without DT should be done that way.

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-13 Thread Shawn Guo
On Fri, Mar 13, 2015 at 09:20:10AM +0100, Sebastian Andrzej Siewior wrote: Hi Shawn, On Fri, Mar 13, 2015 at 11:29:32AM +0800, Shawn Guo wrote: We did not add a DT property for it, because there was already enough info (clock configuration) in DT for kernel to figure it out. Correct. My

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-12 Thread Shawn Guo
On Thu, Mar 12, 2015 at 12:43:40PM -0700, Stephen Boyd wrote: On 03/12/15 10:20, Sebastian Andrzej Siewior wrote: On 2015-02-17 14:01:04 [-0800], Stephen Boyd wrote: diff = --- arch/arm/mach-imx/mach-imx6q.c +++ /tmp/cocci-output-11792-b62223-mach-imx6q.c @@ -211,7 +211,6 @@ static

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-12 Thread Sebastian Andrzej Siewior
On 2015-02-17 14:01:04 [-0800], Stephen Boyd wrote: diff = --- arch/arm/mach-imx/mach-imx6q.c +++ /tmp/cocci-output-11792-b62223-mach-imx6q.c @@ -211,7 +211,6 @@ static void __init imx6q_1588_init(void) * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad * (external

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-03-12 Thread Stephen Boyd
On 03/12/15 10:20, Sebastian Andrzej Siewior wrote: On 2015-02-17 14:01:04 [-0800], Stephen Boyd wrote: diff = --- arch/arm/mach-imx/mach-imx6q.c +++ /tmp/cocci-output-11792-b62223-mach-imx6q.c @@ -211,7 +211,6 @@ static void __init imx6q_1588_init(void) * set bit IOMUXC_GPR1[21]. Or

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-17 Thread Stephen Boyd
On 02/05/15 18:15, Stephen Boyd wrote: On 02/05/15 07:45, Quentin Lambert wrote: On 05/02/2015 00:26, Stephen Boyd wrote: If you want me to I can enlarge the search to other directories. Yes please do. And if you could share the coccinelle patch that would be great. Thanks. structclk.cocci

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-06 Thread Julia Lawall
On Fri, 6 Feb 2015, Quentin Lambert wrote: On 06/02/2015 03:15, Stephen Boyd wrote: Thanks for the coccinelle patch. Thinking more about it, I don't think we care if the pointer is dereferenced because that would require a definition of struct clk and that is most likely not the case

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-06 Thread Quentin Lambert
On 06/02/2015 03:15, Stephen Boyd wrote: Thanks for the coccinelle patch. Thinking more about it, I don't think we care if the pointer is dereferenced because that would require a definition of struct clk and that is most likely not the case outside of the clock framework. Did you scan the

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-06 Thread Stephen Boyd
On 02/06/15 01:12, Julia Lawall wrote: On Fri, 6 Feb 2015, Quentin Lambert wrote: On 06/02/2015 03:15, Stephen Boyd wrote: Thanks for the coccinelle patch. Thinking more about it, I don't think we care if the pointer is dereferenced because that would require a definition of struct clk and

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-05 Thread Quentin Lambert
Sorry let me do that properly. On 05/02/2015 16:45, Quentin Lambert wrote: On 05/02/2015 00:26, Stephen Boyd wrote: If you want me to I can enlarge the search to other directories. Yes please do. And if you could share the coccinelle patch that would be great. Thanks. structclk.cocci is

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-05 Thread Quentin Lambert
On 05/02/2015 00:26, Stephen Boyd wrote: If you want me to I can enlarge the search to other directories. Yes please do. And if you could share the coccinelle patch that would be great. Thanks. structclk.cocci is the coccinelle patch structclk-arm.patch is the result I got when applying it

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-05 Thread Stephen Boyd
On 02/05/15 08:02, Quentin Lambert wrote: Sorry let me do that properly. On 05/02/2015 16:45, Quentin Lambert wrote: On 05/02/2015 00:26, Stephen Boyd wrote: If you want me to I can enlarge the search to other directories. Yes please do. And if you could share the coccinelle patch that

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-05 Thread Stephen Boyd
On 02/05/15 07:45, Quentin Lambert wrote: On 05/02/2015 00:26, Stephen Boyd wrote: If you want me to I can enlarge the search to other directories. Yes please do. And if you could share the coccinelle patch that would be great. Thanks. structclk.cocci is the coccinelle patch

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-04 Thread Stephen Boyd
On 02/03/15 08:04, Quentin Lambert wrote: Hello, Julia asked me to have a look and see if I can help. I have found these three cases using Coccinnelle in the mach-omap2 directory. ./arch/arm/mach-omap2/clkt_clksel.c @@ -67,7 +67,6 @@ static const struct clksel *_get_clksel_

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-03 Thread Quentin Lambert
Hello, Julia asked me to have a look and see if I can help. On 02/02/2015 23:50, Mike Turquette wrote: Quoting Stephen Boyd (2015-02-02 14:35:59) On 02/02/15 13:31, Julia Lawall wrote: On Mon, 2 Feb 2015, Stephen Boyd wrote: Julia, Is there a way we can write a coccinelle script to check