From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, bp@alien8.de, tony.luck@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/7] perf: x86: intel: uncore: constify attribute_group structures.
Date: Thu, 20 Jul 2017 17:00:32 +0530
Message-ID: <1500550238-15655-2-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500550238-15655-1-git-send-email-arvind.yadav.cs@gmail.com>
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by 'uncore.h' work with const
attribute_group. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
change in v2:
Remove before/after size comparison from commit message.
arch/x86/events/intel/uncore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 44ec523..1c5390f 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -721,7 +721,7 @@ static ssize_t uncore_get_attr_cpumask(struct device *dev,
NULL,
};
-static struct attribute_group uncore_pmu_attr_group = {
+static const struct attribute_group uncore_pmu_attr_group = {
.attrs = uncore_pmu_attrs,
};
--
1.9.1
next prev parent reply index
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 11:30 [PATCH v2 0/7] constify x86 " Arvind Yadav
2017-07-20 11:30 ` Arvind Yadav [this message]
2017-08-18 9:33 ` [tip:x86/urgent] x86: Constify " tip-bot for Arvind Yadav
2017-07-20 11:30 ` [PATCH v2 2/7] perf: x86: intel: uncore_nhmex: constify " Arvind Yadav
2017-07-20 11:30 ` [PATCH v2 3/7] perf: x86: intel: uncore_snb: " Arvind Yadav
2017-07-20 11:30 ` [PATCH v2 4/7] perf: x86: intel: uncore_snbep: " Arvind Yadav
2017-07-20 11:30 ` [PATCH v2 5/7] x86: ksysfs: " Arvind Yadav
2017-07-20 11:30 ` [PATCH v2 6/7] x86: therm_throt: " Arvind Yadav
2017-07-20 15:58 ` Borislav Petkov
2017-07-20 11:30 ` [PATCH v2 7/7] x86: microcode: " Arvind Yadav
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=1500550238-15655-2-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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
LKML Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
linux-kernel@vger.kernel.org
public-inbox-index lkml
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git