[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABXOdTd4iHi5=TJymRyD9c=A+=Lj2E3sFmaUzRpMJGLkk6+ZOA@mail.gmail.com>
Date: Wed, 12 Sep 2018 09:50:16 -0700
From: Guenter Roeck <groeck@...gle.com>
To: Zubin Mithra <zsm@...omium.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
Guenter Roeck <groeck@...omium.org>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init
On Wed, Sep 12, 2018 at 9:45 AM Zubin Mithra <zsm@...omium.org> wrote:
>
> pt_cap_group is written to in pt_pmu_hw_init and not modified after. This makes
> it a suitable candidate for annotating as __ro_after_init.
>
> Signed-off-by: Zubin Mithra <zsm@...omium.org>
Reviewed-by: Guenter Roeck <groeck@...omium.org>
> ---
> arch/x86/events/intel/pt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
> index 8d016ce5b80d..3a0aa83cbd07 100644
> --- a/arch/x86/events/intel/pt.c
> +++ b/arch/x86/events/intel/pt.c
> @@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
> return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
> }
>
> -static struct attribute_group pt_cap_group = {
> +static struct attribute_group pt_cap_group __ro_after_init = {
> .name = "caps",
> };
>
> --
> 2.18.0.597.ga71716f1ad-goog
>
Powered by blists - more mailing lists