From: Arend Van Spriel <arend.vanspriel@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>, backports@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 2/3] backports: restrict group_attr spatch properly
Date: Mon, 6 Feb 2017 23:22:20 +0100 [thread overview]
Message-ID: <2e16b777-2ac5-023e-ba7f-03e5f11bc661@broadcom.com> (raw)
In-Reply-To: <20170206123956.20082-2-johannes@sipsolutions.net>
On 6-2-2017 13:39, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
Maybe explain what went wrong here. I had email discussion with Julia
about this one (on cocci list), but glad you picked it up ;-)
Regards,
Arend
> Change-Id: I8881dab783fe69a85f833c96f0a4abd3ab062e84
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> .../0001-group-attr/0001-group_attr_class.cocci | 18 ++++++++++++------
> .../generic/0001-group-attr/0002-group_attr_bus.cocci | 19 ++++++++++++-------
> 2 files changed, 24 insertions(+), 13 deletions(-)
>
> diff --git a/patches/collateral-evolutions/generic/0001-group-attr/0001-group_attr_class.cocci b/patches/collateral-evolutions/generic/0001-group-attr/0001-group_attr_class.cocci
> index ea2e7039f50c..a9c84651eedc 100644
> --- a/patches/collateral-evolutions/generic/0001-group-attr/0001-group_attr_class.cocci
> +++ b/patches/collateral-evolutions/generic/0001-group-attr/0001-group_attr_class.cocci
> @@ -33,9 +33,15 @@ declarer name ATTRIBUTE_GROUPS;
>
> ATTRIBUTE_GROUPS(group);
>
> -@ class_group depends on attribute_group @
> +@script:python attribute_groups_name@
> +group << attribute_group.group;
> +groups;
> +@@
> +coccinelle.groups = group + "_groups"
> +
> +@ class_group @
> identifier group_class;
> -expression groups;
> +identifier attribute_groups_name.groups;
> fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs";
> @@
>
> @@ -47,9 +53,9 @@ struct class group_class = {
> +#endif
> };
>
> -@ attribute_group_mod depends on attribute_group && class_group @
> +@ attribute_group_mod depends on class_group @
> declarer name ATTRIBUTE_GROUPS_BACKPORT;
> -identifier group;
> +identifier attribute_group.group;
> @@
>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
> @@ -59,10 +65,10 @@ ATTRIBUTE_GROUPS(group);
> +ATTRIBUTE_GROUPS_BACKPORT(group);
> +#endif
>
> -@ class_registering depends on class_group && attribute_group_mod @
> +@ class_registering @
> identifier class_register, ret;
> identifier class_group.group_class;
> -fresh identifier group_class_init = "init_" ## attribute_group_mod.group ## "_attrs";
> +fresh identifier group_class_init = "init_" ## attribute_group.group ## "_attrs";
> @@
>
> (
> diff --git a/patches/collateral-evolutions/generic/0001-group-attr/0002-group_attr_bus.cocci b/patches/collateral-evolutions/generic/0001-group-attr/0002-group_attr_bus.cocci
> index b01da875083b..c19e9d7f3eda 100644
> --- a/patches/collateral-evolutions/generic/0001-group-attr/0002-group_attr_bus.cocci
> +++ b/patches/collateral-evolutions/generic/0001-group-attr/0002-group_attr_bus.cocci
> @@ -31,9 +31,15 @@ declarer name ATTRIBUTE_GROUPS;
>
> ATTRIBUTE_GROUPS(group);
>
> -@ bus_group depends on attribute_group @
> +@script:python attribute_groups_name@
> +group << attribute_group.group;
> +groups;
> +@@
> +coccinelle.groups = group + "_groups"
> +
> +@ bus_group @
> identifier group_bus;
> -expression groups;
> +identifier attribute_groups_name.groups;
> fresh identifier group_dev_attr = attribute_group.group ## "_dev_attrs";
> @@
>
> @@ -45,9 +51,9 @@ struct bus_type group_bus = {
> +#endif
> };
>
> -@ attribute_group_mod depends on attribute_group && bus_group @
> +@ attribute_group_mod depends on bus_group @
> declarer name ATTRIBUTE_GROUPS_BACKPORT;
> -identifier group;
> +identifier attribute_group.group;
> @@
>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
> @@ -57,10 +63,10 @@ ATTRIBUTE_GROUPS(group);
> +ATTRIBUTE_GROUPS_BACKPORT(group);
> +#endif
>
> -@ bus_registering depends on bus_group && attribute_group_mod @
> +@ bus_registering @
> identifier bus_register, ret;
> identifier bus_group.group_bus;
> -fresh identifier group_bus_init = "init_" ## attribute_group_mod.group ## "_attrs";
> +fresh identifier group_bus_init = "init_" ## attribute_group.group ## "_attrs";
> @@
>
> (
> @@ -70,4 +76,3 @@ fresh identifier group_bus_init = "init_" ## attribute_group_mod.group ## "_attr
> + group_bus_init();
> ret = bus_register(&group_bus);
> )
> -
>
--
To unsubscribe from this list: send the line "unsubscribe backports" in
next prev parent reply other threads:[~2017-02-06 22:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 12:39 [PATCH 1/3] backports: devcoredump: make patch apply Johannes Berg
2017-02-06 12:39 ` [PATCH 2/3] backports: restrict group_attr spatch properly Johannes Berg
2017-02-06 22:22 ` Arend Van Spriel [this message]
2017-02-06 12:39 ` [PATCH 3/3] backports: support class_groups Johannes Berg
2017-02-06 22:36 ` Arend Van Spriel
2017-02-07 6:29 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e16b777-2ac5-023e-ba7f-03e5f11bc661@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=backports@vger.kernel.org \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox