Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936028AbdGTLb0 (ORCPT ); Thu, 20 Jul 2017 07:31:26 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36906 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933882AbdGTLbW (ORCPT ); Thu, 20 Jul 2017 07:31:22 -0400 From: Arvind Yadav 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> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500550238-15655-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500550238-15655-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 866 Lines: 27 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 --- 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