Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752710AbdGCHrM (ORCPT ); Mon, 3 Jul 2017 03:47:12 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34696 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbdGCHrL (ORCPT ); Mon, 3 Jul 2017 03:47:11 -0400 From: Arvind Yadav To: nico@linaro.org, mark.rutland@arm.com, mingo@kernel.org, lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] bus: arm-cci: constify attribute_group structures. Date: Mon, 3 Jul 2017 13:16:55 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1124 Lines: 35 attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- 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