* [PATCH 0/2] detect identical chip data arrays
@ 2017-10-08 19:18 Julia Lawall
2017-10-08 19:18 ` [PATCH 1/2] scripts: coccinelle: api: drop battery.cocci Julia Lawall
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Julia Lawall @ 2017-10-08 19:18 UTC (permalink / raw)
To: Liam Breck, Sebastian Reichel, pali.rohar, Linux PM mailing list
Cc: kernel-janitors, Nicolas Palix, linux-kernel, Masahiro Yamada,
Michal Marek, Joe Perches, kbuild test robot, cocci
Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
messages to indicate that some structures are the same, in response to
feedback from Liam Breck.
Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
is not yet released, it actually works with the version currently available
on Github, eg from Coccinelle commit 3ba77b3a0f91.
---
scripts/coccinelle/api/battery.cocci | 161 ------------------------
scripts/coccinelle/api/check_bq27xxx_data.cocci | 161 ++++++++++++++++++++++++
2 files changed, 161 insertions(+), 161 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] scripts: coccinelle: api: drop battery.cocci
2017-10-08 19:18 [PATCH 0/2] detect identical chip data arrays Julia Lawall
@ 2017-10-08 19:18 ` Julia Lawall
2017-10-08 19:18 ` [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays Julia Lawall
2017-10-08 20:32 ` [PATCH 0/2] " Sebastian Reichel
2 siblings, 0 replies; 11+ messages in thread
From: Julia Lawall @ 2017-10-08 19:18 UTC (permalink / raw)
To: Liam Breck, Sebastian Reichel, pali.rohar, Linux PM mailing list
Cc: kernel-janitors, Nicolas Palix, linux-kernel, Masahiro Yamada,
Michal Marek, Joe Perches, kbuild test robot, cocci
Drop bettery.cocci as a more specific filename was preferred.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
scripts/coccinelle/api/battery.cocci | 161 -----------------------------------
1 file changed, 161 deletions(-)
diff --git a/scripts/coccinelle/api/battery.cocci b/scripts/coccinelle/api/battery.cocci
deleted file mode 100644
index 77c145a..0000000
--- a/scripts/coccinelle/api/battery.cocci
+++ /dev/null
@@ -1,161 +0,0 @@
-/// Detect BQ27XXX_DATA structures with identical registers, dm registers or
-/// properties.
-//# Doesn't unfold macros used in register or property fields.
-//# Requires OCaml scripting
-///
-// Confidence: High
-// Copyright: (C) 2017 Julia Lawall, Inria/LIP6, GPLv2.
-// URL: http://coccinelle.lip6.fr/
-// Requires: 1.0.7
-// Keywords: BQ27XXX_DATA
-
-virtual report
-
-@initialize:ocaml@
-@@
-
-let print_report p msg =
- let p = List.hd p in
- Printf.printf "%s:%d:%d-%d: %s" p.file p.line p.col p.col_end msg
-
-@str depends on report@
-type t;
-identifier i,i1,i2;
-expression e1,e2;
-@@
-
-t i[] = {
- ...,
- [e1] = BQ27XXX_DATA(i1,...),
- ...,
- [e2] = BQ27XXX_DATA(i2,...),
- ...,
-};
-
-@script:ocaml tocheck@
-i1 << str.i1;
-i2 << str.i2;
-i1regs; i2regs;
-i1dmregs; i2dmregs;
-i1props; i2props;
-@@
-
-if not(i1 = i2)
-then
- begin
- i1regs := make_ident (i1 ^ "_regs");
- i2regs := make_ident (i2 ^ "_regs");
- i1dmregs := make_ident (i1 ^ "_dm_regs");
- i2dmregs := make_ident (i2 ^ "_dm_regs");
- i1props := make_ident (i1 ^ "_props");
- i2props := make_ident (i2 ^ "_props")
- end
-
-(* ---------------------------------------------------------------- *)
-
-@getregs1@
-typedef u8;
-identifier tocheck.i1regs;
-initializer list i1regs_vals;
-position p1;
-@@
-
-u8 i1regs@p1[...] = { i1regs_vals, };
-
-@getregs2@
-identifier tocheck.i2regs;
-initializer list i2regs_vals;
-position p2;
-@@
-
-u8 i2regs@p2[...] = { i2regs_vals, };
-
-@script:ocaml@
-(_,i1regs_vals) << getregs1.i1regs_vals;
-(_,i2regs_vals) << getregs2.i2regs_vals;
-i1regs << tocheck.i1regs;
-i2regs << tocheck.i2regs;
-p1 << getregs1.p1;
-p2 << getregs2.p2;
-@@
-
-if i1regs < i2regs &&
- List.sort compare i1regs_vals = List.sort compare i2regs_vals
-then
- let msg =
- Printf.sprintf
- "WARNING %s and %s (line %d) have the same registers\n"
- i1regs i2regs (List.hd p2).line in
- print_report p1 msg
-
-(* ---------------------------------------------------------------- *)
-
-@getdmregs1@
-identifier tocheck.i1dmregs;
-initializer list i1dmregs_vals;
-position p1;
-@@
-
-struct bq27xxx_dm_reg i1dmregs@p1[] = { i1dmregs_vals, };
-
-@getdmregs2@
-identifier tocheck.i2dmregs;
-initializer list i2dmregs_vals;
-position p2;
-@@
-
-struct bq27xxx_dm_reg i2dmregs@p2[] = { i2dmregs_vals, };
-
-@script:ocaml@
-(_,i1dmregs_vals) << getdmregs1.i1dmregs_vals;
-(_,i2dmregs_vals) << getdmregs2.i2dmregs_vals;
-i1dmregs << tocheck.i1dmregs;
-i2dmregs << tocheck.i2dmregs;
-p1 << getdmregs1.p1;
-p2 << getdmregs2.p2;
-@@
-
-if i1dmregs < i2dmregs &&
- List.sort compare i1dmregs_vals = List.sort compare i2dmregs_vals
-then
- let msg =
- Printf.sprintf
- "WARNING %s and %s (line %d) have the same dm registers\n"
- i1dmregs i2dmregs (List.hd p2).line in
- print_report p1 msg
-
-(* ---------------------------------------------------------------- *)
-
-@getprops1@
-identifier tocheck.i1props;
-initializer list[n1] i1props_vals;
-position p1;
-@@
-
-enum power_supply_property i1props@p1[] = { i1props_vals, };
-
-@getprops2@
-identifier tocheck.i2props;
-initializer list[n2] i2props_vals;
-position p2;
-@@
-
-enum power_supply_property i2props@p2[] = { i2props_vals, };
-
-@script:ocaml@
-(_,i1props_vals) << getprops1.i1props_vals;
-(_,i2props_vals) << getprops2.i2props_vals;
-i1props << tocheck.i1props;
-i2props << tocheck.i2props;
-p1 << getprops1.p1;
-p2 << getprops2.p2;
-@@
-
-if i1props < i2props &&
- List.sort compare i1props_vals = List.sort compare i2props_vals
-then
- let msg =
- Printf.sprintf
- "WARNING %s and %s (line %d) have the same properties\n"
- i1props i2props (List.hd p2).line in
- print_report p1 msg
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays
2017-10-08 19:18 [PATCH 0/2] detect identical chip data arrays Julia Lawall
2017-10-08 19:18 ` [PATCH 1/2] scripts: coccinelle: api: drop battery.cocci Julia Lawall
@ 2017-10-08 19:18 ` Julia Lawall
2017-11-07 0:21 ` Masahiro Yamada
2017-10-08 20:32 ` [PATCH 0/2] " Sebastian Reichel
2 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2017-10-08 19:18 UTC (permalink / raw)
To: Liam Breck, Sebastian Reichel, pali.rohar, Linux PM mailing list
Cc: kernel-janitors, Joe Perches, Gilles Muller, Nicolas Palix,
Michal Marek, cocci, linux-kernel, kbuild test robot,
Masahiro Yamada
This semantic patch detects duplicate arrays declared using BQ27XXX_DATA
within a single structure. It is currently specific to the file
drivers/power/supply/bq27xxx_battery.c. Nevertheless, having the script in
the kernel will allow others to check their code if the data structures
change in the future.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
scripts/coccinelle/api/check_bq27xxx_data.cocci | 161 ++++++++++++++++++++++++
1 file changed, 161 insertions(+)
diff --git a/scripts/coccinelle/api/check_bq27xxx_data.cocci b/scripts/coccinelle/api/check_bq27xxx_data.cocci
new file mode 100644
index 0000000..9212b85
--- /dev/null
+++ b/scripts/coccinelle/api/check_bq27xxx_data.cocci
@@ -0,0 +1,161 @@
+/// Detect BQ27XXX_DATA structures with identical registers, dm registers or
+/// properties.
+//# Doesn't unfold macros used in register or property fields.
+//# Requires OCaml scripting
+///
+// Confidence: High
+// Copyright: (C) 2017 Julia Lawall, Inria/LIP6, GPLv2.
+// URL: http://coccinelle.lip6.fr/
+// Requires: 1.0.7
+// Keywords: BQ27XXX_DATA
+
+virtual report
+
+@initialize:ocaml@
+@@
+
+let print_report p msg =
+ let p = List.hd p in
+ Printf.printf "%s:%d:%d-%d: %s" p.file p.line p.col p.col_end msg
+
+@str depends on report@
+type t;
+identifier i,i1,i2;
+expression e1,e2;
+@@
+
+t i[] = {
+ ...,
+ [e1] = BQ27XXX_DATA(i1,...),
+ ...,
+ [e2] = BQ27XXX_DATA(i2,...),
+ ...,
+};
+
+@script:ocaml tocheck@
+i1 << str.i1;
+i2 << str.i2;
+i1regs; i2regs;
+i1dmregs; i2dmregs;
+i1props; i2props;
+@@
+
+if not(i1 = i2)
+then
+ begin
+ i1regs := make_ident (i1 ^ "_regs");
+ i2regs := make_ident (i2 ^ "_regs");
+ i1dmregs := make_ident (i1 ^ "_dm_regs");
+ i2dmregs := make_ident (i2 ^ "_dm_regs");
+ i1props := make_ident (i1 ^ "_props");
+ i2props := make_ident (i2 ^ "_props")
+ end
+
+(* ---------------------------------------------------------------- *)
+
+@getregs1@
+typedef u8;
+identifier tocheck.i1regs;
+initializer list i1regs_vals;
+position p1;
+@@
+
+u8 i1regs@p1[...] = { i1regs_vals, };
+
+@getregs2@
+identifier tocheck.i2regs;
+initializer list i2regs_vals;
+position p2;
+@@
+
+u8 i2regs@p2[...] = { i2regs_vals, };
+
+@script:ocaml@
+(_,i1regs_vals) << getregs1.i1regs_vals;
+(_,i2regs_vals) << getregs2.i2regs_vals;
+i1regs << tocheck.i1regs;
+i2regs << tocheck.i2regs;
+p1 << getregs1.p1;
+p2 << getregs2.p2;
+@@
+
+if i1regs < i2regs &&
+ List.sort compare i1regs_vals = List.sort compare i2regs_vals
+then
+ let msg =
+ Printf.sprintf
+ "WARNING %s and %s (line %d) are identical\n"
+ i1regs i2regs (List.hd p2).line in
+ print_report p1 msg
+
+(* ---------------------------------------------------------------- *)
+
+@getdmregs1@
+identifier tocheck.i1dmregs;
+initializer list i1dmregs_vals;
+position p1;
+@@
+
+struct bq27xxx_dm_reg i1dmregs@p1[] = { i1dmregs_vals, };
+
+@getdmregs2@
+identifier tocheck.i2dmregs;
+initializer list i2dmregs_vals;
+position p2;
+@@
+
+struct bq27xxx_dm_reg i2dmregs@p2[] = { i2dmregs_vals, };
+
+@script:ocaml@
+(_,i1dmregs_vals) << getdmregs1.i1dmregs_vals;
+(_,i2dmregs_vals) << getdmregs2.i2dmregs_vals;
+i1dmregs << tocheck.i1dmregs;
+i2dmregs << tocheck.i2dmregs;
+p1 << getdmregs1.p1;
+p2 << getdmregs2.p2;
+@@
+
+if i1dmregs < i2dmregs &&
+ List.sort compare i1dmregs_vals = List.sort compare i2dmregs_vals
+then
+ let msg =
+ Printf.sprintf
+ "WARNING %s and %s (line %d) are identical\n"
+ i1dmregs i2dmregs (List.hd p2).line in
+ print_report p1 msg
+
+(* ---------------------------------------------------------------- *)
+
+@getprops1@
+identifier tocheck.i1props;
+initializer list[n1] i1props_vals;
+position p1;
+@@
+
+enum power_supply_property i1props@p1[] = { i1props_vals, };
+
+@getprops2@
+identifier tocheck.i2props;
+initializer list[n2] i2props_vals;
+position p2;
+@@
+
+enum power_supply_property i2props@p2[] = { i2props_vals, };
+
+@script:ocaml@
+(_,i1props_vals) << getprops1.i1props_vals;
+(_,i2props_vals) << getprops2.i2props_vals;
+i1props << tocheck.i1props;
+i2props << tocheck.i2props;
+p1 << getprops1.p1;
+p2 << getprops2.p2;
+@@
+
+if i1props < i2props &&
+ List.sort compare i1props_vals = List.sort compare i2props_vals
+then
+ let msg =
+ Printf.sprintf
+ "WARNING %s and %s (line %d) are identical\n"
+ i1props i2props (List.hd p2).line in
+ print_report p1 msg
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-08 19:18 [PATCH 0/2] detect identical chip data arrays Julia Lawall
2017-10-08 19:18 ` [PATCH 1/2] scripts: coccinelle: api: drop battery.cocci Julia Lawall
2017-10-08 19:18 ` [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays Julia Lawall
@ 2017-10-08 20:32 ` Sebastian Reichel
2017-10-08 20:44 ` Julia Lawall
2 siblings, 1 reply; 11+ messages in thread
From: Sebastian Reichel @ 2017-10-08 20:32 UTC (permalink / raw)
To: Julia Lawall
Cc: Liam Breck, pali.rohar, Linux PM mailing list, kernel-janitors,
Joe Perches, Gilles Muller, Nicolas Palix, Michal Marek, cocci,
linux-kernel, kbuild test robot, Masahiro Yamada
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]
Hi,
On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
> Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
> messages to indicate that some structures are the same, in response to
> feedback from Liam Breck.
>
> Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
> is not yet released, it actually works with the version currently available
> on Github, eg from Coccinelle commit 3ba77b3a0f91.
I think the rename makes sense, but I would expect the move to
happen in one go with "git send-email -M", so that it detects the
rename.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-08 20:32 ` [PATCH 0/2] " Sebastian Reichel
@ 2017-10-08 20:44 ` Julia Lawall
2017-10-08 21:26 ` Sebastian Reichel
2017-10-09 8:31 ` Masahiro Yamada
0 siblings, 2 replies; 11+ messages in thread
From: Julia Lawall @ 2017-10-08 20:44 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Linux PM mailing list, Nicolas Palix, kernel-janitors,
linux-kernel, Masahiro Yamada, Liam Breck, Michal Marek,
pali.rohar, Joe Perches, kbuild test robot, cocci
On Sun, 8 Oct 2017, Sebastian Reichel wrote:
> Hi,
>
> On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
> > Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
> > messages to indicate that some structures are the same, in response to
> > feedback from Liam Breck.
> >
> > Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
> > is not yet released, it actually works with the version currently available
> > on Github, eg from Coccinelle commit 3ba77b3a0f91.
>
> I think the rename makes sense, but I would expect the move to
> happen in one go with "git send-email -M", so that it detects the
> rename.
I'm not actually sure what is the status of the previous version.
Masahiro said applied, but I downloaded his tree and it was not there. So
I thought this way would be easier.
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-08 20:44 ` Julia Lawall
@ 2017-10-08 21:26 ` Sebastian Reichel
2017-10-09 8:31 ` Masahiro Yamada
1 sibling, 0 replies; 11+ messages in thread
From: Sebastian Reichel @ 2017-10-08 21:26 UTC (permalink / raw)
To: Julia Lawall
Cc: Liam Breck, pali.rohar, Linux PM mailing list, kernel-janitors,
Joe Perches, Gilles Muller, Nicolas Palix, Michal Marek, cocci,
linux-kernel, kbuild test robot, Masahiro Yamada
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
Hi,
On Sun, Oct 08, 2017 at 10:44:50PM +0200, Julia Lawall wrote:
> On Sun, 8 Oct 2017, Sebastian Reichel wrote:
> > Hi,
> >
> > On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
> > > Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
> > > messages to indicate that some structures are the same, in response to
> > > feedback from Liam Breck.
> > >
> > > Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
> > > is not yet released, it actually works with the version currently available
> > > on Github, eg from Coccinelle commit 3ba77b3a0f91.
> >
> > I think the rename makes sense, but I would expect the move to
> > happen in one go with "git send-email -M", so that it detects the
> > rename.
>
> I'm not actually sure what is the status of the previous version.
> Masahiro said applied, but I downloaded his tree and it was not there. So
> I thought this way would be easier.
>
> julia
Ok. In that case it makes sense to just apply the one with better
name of course :) Thanks for the script!
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-08 20:44 ` Julia Lawall
2017-10-08 21:26 ` Sebastian Reichel
@ 2017-10-09 8:31 ` Masahiro Yamada
2017-10-09 8:40 ` Julia Lawall
1 sibling, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2017-10-09 8:31 UTC (permalink / raw)
To: Julia Lawall
Cc: Sebastian Reichel, Liam Breck, Pali Rohár,
Linux PM mailing list, kernel-janitors, Joe Perches,
Gilles Muller, Nicolas Palix, Michal Marek, cocci,
Linux Kernel Mailing List, kbuild test robot
2017-10-09 5:44 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>
>
> On Sun, 8 Oct 2017, Sebastian Reichel wrote:
>
>> Hi,
>>
>> On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
>> > Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
>> > messages to indicate that some structures are the same, in response to
>> > feedback from Liam Breck.
>> >
>> > Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
>> > is not yet released, it actually works with the version currently available
>> > on Github, eg from Coccinelle commit 3ba77b3a0f91.
>>
>> I think the rename makes sense, but I would expect the move to
>> happen in one go with "git send-email -M", so that it detects the
>> rename.
>
> I'm not actually sure what is the status of the previous version.
> Masahiro said applied, but I downloaded his tree and it was not there. So
> I thought this way would be easier.
My tree is here:
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
I had applied your patch a few days before.
BTW, how should I handle this series?
1/2 is reverting it.
So, I can drop the previous one entirely,
then pick up 2/2 only.
Is this a good thing to do?
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-09 8:31 ` Masahiro Yamada
@ 2017-10-09 8:40 ` Julia Lawall
2017-10-09 9:11 ` Masahiro Yamada
0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2017-10-09 8:40 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Sebastian Reichel, Liam Breck, Pali Rohár,
Linux PM mailing list, kernel-janitors, Joe Perches,
Gilles Muller, Nicolas Palix, Michal Marek, cocci,
Linux Kernel Mailing List, kbuild test robot
On Mon, 9 Oct 2017, Masahiro Yamada wrote:
> 2017-10-09 5:44 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
> >
> >
> > On Sun, 8 Oct 2017, Sebastian Reichel wrote:
> >
> >> Hi,
> >>
> >> On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
> >> > Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
> >> > messages to indicate that some structures are the same, in response to
> >> > feedback from Liam Breck.
> >> >
> >> > Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
> >> > is not yet released, it actually works with the version currently available
> >> > on Github, eg from Coccinelle commit 3ba77b3a0f91.
> >>
> >> I think the rename makes sense, but I would expect the move to
> >> happen in one go with "git send-email -M", so that it detects the
> >> rename.
> >
> > I'm not actually sure what is the status of the previous version.
> > Masahiro said applied, but I downloaded his tree and it was not there. So
> > I thought this way would be easier.
>
> My tree is here:
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
>
> I had applied your patch a few days before.
OK, I got that tree, but it seemed to go only up to October 1. But maybe
I did not pick the right branch.
>
>
> BTW, how should I handle this series?
>
> 1/2 is reverting it.
>
> So, I can drop the previous one entirely,
> then pick up 2/2 only.
>
> Is this a good thing to do?
That would be perfectly fine with me. You can drop 1/2 already. For 2/2,
it would be nice to have an Ack from Liam first.
thanks,
julia
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] detect identical chip data arrays
2017-10-09 8:40 ` Julia Lawall
@ 2017-10-09 9:11 ` Masahiro Yamada
0 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2017-10-09 9:11 UTC (permalink / raw)
To: Julia Lawall
Cc: Sebastian Reichel, Liam Breck, Pali Rohár,
Linux PM mailing list, kernel-janitors, Joe Perches,
Gilles Muller, Nicolas Palix, Michal Marek, cocci,
Linux Kernel Mailing List, kbuild test robot
2017-10-09 17:40 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>
>
> On Mon, 9 Oct 2017, Masahiro Yamada wrote:
>
>> 2017-10-09 5:44 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>> >
>> >
>> > On Sun, 8 Oct 2017, Sebastian Reichel wrote:
>> >
>> >> Hi,
>> >>
>> >> On Sun, Oct 08, 2017 at 09:18:39PM +0200, Julia Lawall wrote:
>> >> > Rename battery.cocci as check_bq27xxx_data.cocci and adjust the warning
>> >> > messages to indicate that some structures are the same, in response to
>> >> > feedback from Liam Breck.
>> >> >
>> >> > Although check_bq27xxx_data.cocci says is requires Coccinelle 1.0.7, which
>> >> > is not yet released, it actually works with the version currently available
>> >> > on Github, eg from Coccinelle commit 3ba77b3a0f91.
>> >>
>> >> I think the rename makes sense, but I would expect the move to
>> >> happen in one go with "git send-email -M", so that it detects the
>> >> rename.
>> >
>> > I'm not actually sure what is the status of the previous version.
>> > Masahiro said applied, but I downloaded his tree and it was not there. So
>> > I thought this way would be easier.
>>
>> My tree is here:
>> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
>>
>> I had applied your patch a few days before.
>
> OK, I got that tree, but it seemed to go only up to October 1. But maybe
> I did not pick the right branch.
Oct 1 is the date you submitted it.
According to "git log --pretty=fuller", I applied it Oct 5.
I do not not remember when I pushed it, though.
commit ffb11fd663a2b9cefbe24e8e3dd2ebcacd338d69
Author: Julia Lawall <Julia.Lawall@lip6.fr>
AuthorDate: Sun Oct 1 14:42:48 2017 +0200
Commit: Masahiro Yamada <yamada.masahiro@socionext.com>
CommitDate: Thu Oct 5 08:37:12 2017 +0900
coccinelle: api: detect duplicate chip data arrays
>>
>>
>> BTW, how should I handle this series?
>>
>> 1/2 is reverting it.
>>
>> So, I can drop the previous one entirely,
>> then pick up 2/2 only.
>>
>> Is this a good thing to do?
>
> That would be perfectly fine with me. You can drop 1/2 already. For 2/2,
> it would be nice to have an Ack from Liam first.
>
> thanks,
> julia
OK. I will drop the previous one.
I will hold back 2/2 until it gets Ack from Liam.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays
2017-10-08 19:18 ` [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays Julia Lawall
@ 2017-11-07 0:21 ` Masahiro Yamada
2017-11-08 13:04 ` Julia Lawall
0 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2017-11-07 0:21 UTC (permalink / raw)
To: Julia Lawall
Cc: Liam Breck, Sebastian Reichel, Pali Rohár,
Linux PM mailing list, kernel-janitors, Joe Perches,
Gilles Muller, Nicolas Palix, Michal Marek, cocci,
Linux Kernel Mailing List, kbuild test robot
2017-10-09 4:18 GMT+09:00 Julia Lawall <Julia.Lawall@lip6.fr>:
> This semantic patch detects duplicate arrays declared using BQ27XXX_DATA
> within a single structure. It is currently specific to the file
> drivers/power/supply/bq27xxx_battery.c. Nevertheless, having the script in
> the kernel will allow others to check their code if the data structures
> change in the future.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
Applied to linux-kbuild/misc.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays
2017-11-07 0:21 ` Masahiro Yamada
@ 2017-11-08 13:04 ` Julia Lawall
0 siblings, 0 replies; 11+ messages in thread
From: Julia Lawall @ 2017-11-08 13:04 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Julia Lawall, Liam Breck, Sebastian Reichel, Pali Rohár,
Linux PM mailing list, kernel-janitors, Joe Perches,
Gilles Muller, Nicolas Palix, Michal Marek, cocci,
Linux Kernel Mailing List, kbuild test robot
On Tue, 7 Nov 2017, Masahiro Yamada wrote:
> 2017-10-09 4:18 GMT+09:00 Julia Lawall <Julia.Lawall@lip6.fr>:
> > This semantic patch detects duplicate arrays declared using BQ27XXX_DATA
> > within a single structure. It is currently specific to the file
> > drivers/power/supply/bq27xxx_battery.c. Nevertheless, having the script in
> > the kernel will allow others to check their code if the data structures
> > change in the future.
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> >
>
> Applied to linux-kbuild/misc.
Thanks!
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-11-08 13:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-08 19:18 [PATCH 0/2] detect identical chip data arrays Julia Lawall
2017-10-08 19:18 ` [PATCH 1/2] scripts: coccinelle: api: drop battery.cocci Julia Lawall
2017-10-08 19:18 ` [PATCH 2/2] scripts: coccinelle: api: detect identical chip data arrays Julia Lawall
2017-11-07 0:21 ` Masahiro Yamada
2017-11-08 13:04 ` Julia Lawall
2017-10-08 20:32 ` [PATCH 0/2] " Sebastian Reichel
2017-10-08 20:44 ` Julia Lawall
2017-10-08 21:26 ` Sebastian Reichel
2017-10-09 8:31 ` Masahiro Yamada
2017-10-09 8:40 ` Julia Lawall
2017-10-09 9:11 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).