linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Zubin Mithra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org, groeck@chromium.org,
	hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org,
	tglx@linutronix.de, zsm@chromium.org, peterz@infradead.org
Subject: [tip:perf/core] perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
Date: Wed, 12 Sep 2018 14:27:51 -0700	[thread overview]
Message-ID: <tip-49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61@git.kernel.org> (raw)
In-Reply-To: <20180912164510.23444-1-zsm@chromium.org>

Commit-ID:  49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61
Gitweb:     https://git.kernel.org/tip/49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61
Author:     Zubin Mithra <zsm@chromium.org>
AuthorDate: Wed, 12 Sep 2018 09:45:10 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 12 Sep 2018 21:16:16 +0200

perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init

'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@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: keescook@chromium.org
Link: http://lkml.kernel.org/r/20180912164510.23444-1-zsm@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.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",
 };
 

      parent reply	other threads:[~2018-09-12 21:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 16:45 [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init Zubin Mithra
2018-09-12 16:50 ` Guenter Roeck
2018-09-12 21:27 ` tip-bot for Zubin Mithra [this message]

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=tip-49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=groeck@chromium.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=zsm@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).