From: Mark Rutland <mark.rutland@arm.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: nico@linaro.org, mingo@kernel.org, lorenzo.pieralisi@arm.com,
suzuki.poulose@arm.com, linux-kernel@vger.kernel.org,
Punit Agrawal <punit.agrawal@arm.com>
Subject: Re: [PATCH] bus: arm-cci: constify attribute_group structures.
Date: Tue, 4 Jul 2017 12:35:13 +0100 [thread overview]
Message-ID: <20170704113513.GB21587@leverpostej> (raw)
In-Reply-To: <d883f13621e29d4ee83dc620c5603fb9d1683b0d.1499067362.git.arvind.yadav.cs@gmail.com>
On Mon, Jul 03, 2017 at 01:16:55PM +0530, Arvind Yadav wrote:
> attribute_groups are not supposed to change at runtime. All functions
> working with attribute_groups provided by <linux/sysfs.h> work with const
> attribute_group. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
>From a quick scan, this looks sane to me:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Suzuki, Punit, I guess one of you will queue this, assuming you're happy
with it.
Mark.
> ---
> drivers/bus/arm-cci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> index c49da15..64c75d2 100644
> --- a/drivers/bus/arm-cci.c
> +++ b/drivers/bus/arm-cci.c
> @@ -1445,16 +1445,16 @@ static ssize_t pmu_cpumask_attr_show(struct device *dev,
> NULL,
> };
>
> -static struct attribute_group pmu_attr_group = {
> +static const struct attribute_group pmu_attr_group = {
> .attrs = pmu_attrs,
> };
>
> -static struct attribute_group pmu_format_attr_group = {
> +static const struct attribute_group pmu_format_attr_group = {
> .name = "format",
> .attrs = NULL, /* Filled in cci_pmu_init_attrs */
> };
>
> -static struct attribute_group pmu_event_attr_group = {
> +static const struct attribute_group pmu_event_attr_group = {
> .name = "events",
> .attrs = NULL, /* Filled in cci_pmu_init_attrs */
> };
> --
> 1.9.1
>
next prev parent reply other threads:[~2017-07-04 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 7:46 [PATCH] bus: arm-cci: constify attribute_group structures Arvind Yadav
2017-07-04 11:35 ` Mark Rutland [this message]
2017-07-05 16:03 ` Suzuki K Poulose
2017-07-06 4:53 ` Arvind Yadav
2017-07-06 8:41 ` Suzuki K Poulose
2017-07-16 9:29 ` kbuild test robot
2017-07-16 10:32 ` arvind
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=20170704113513.GB21587@leverpostej \
--to=mark.rutland@arm.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mingo@kernel.org \
--cc=nico@linaro.org \
--cc=punit.agrawal@arm.com \
--cc=suzuki.poulose@arm.com \
/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