From patchwork Sun Jan 17 21:28:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12025753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45AEDC433E6 for ; Sun, 17 Jan 2021 21:30:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E5FA224B1 for ; Sun, 17 Jan 2021 21:30:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E5FA224B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ouswnZbpW6fUbixVkFwmuXeRGycAbvgtJVhS67+B0fE=; b=kVRskUDDeCW4V3dBpwcNk+H4k vpmqZYNgnhN8isGg2uOCdhLBJq+eeOciRJpcDOM5VxYIIY3g0MRvqO4QCTvhWplitJwHAK/kRNDFd SUBSSdhwgNCSa6+MqUM/ZKxP93en5U5PpTUKeiOLPDtS1hNMtzGnIiXJonZIvJoYOs/UsWfMlu0kL d9PGqS8+AaTkWi2E4larv9fbM9vKqEhXzZre6N/i9hIXGi/EHpPrTaBR2+lUbLksJBeeONbfqDDPk Z2phAER2jwoUkKnX+MfG5HyqZMBuodSnCykC/ZWby/zJ0mRHp8W64f1OMiufZtXKaPS3fmJjzrjOy zmXqCycmA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Fbb-0005GT-JE; Sun, 17 Jan 2021 21:29:03 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1FbT-0005ER-34 for linux-arm-kernel@lists.infradead.org; Sun, 17 Jan 2021 21:28:55 +0000 Received: by mail-lj1-x232.google.com with SMTP id u21so16247457lja.0 for ; Sun, 17 Jan 2021 13:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1wUaf9lrdnf3y/o85VysxjiWKzQk/1dFwHGTwfk7M+s=; b=tX0M5CaMFaJxBYIeOdNfJd8R9RawSr/4pdBNMoHNKL6TVUxcY+FxU+lXEUfsZFbrl2 VmunUJsvt6KZhYd2XlO4eAXBsGFh9Sp3aYTlEKpcqdnE7jbBY/grtHkvIE+lD9KLx5X0 VN+wZlG56K3cTRq2Gkyq3Pa8YhcP5vdfbnZBSHJ2L1/ZmBn9jxzj+UduZyO6GgYzqhqj 6qX3Slj7DWr9SFBhQfsXyHHEllm2hwQKCckAMTBKkSbpjFQ+i3tC7esfnGy/ylzdL7Br 5JJrucvbDKBswMxR1mSjMfesOpWv4xq1T7Tpvd7wTfPcBD7mxYjsANdQcHVmKtpIp3lV QRow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1wUaf9lrdnf3y/o85VysxjiWKzQk/1dFwHGTwfk7M+s=; b=kMp/GjhDTgTlQbRDQyeKV6wpcTN2Gvgejoo4zv9Sr1J2n8LEnDWUj4oxDZGdf2iCDZ m8uubTmBapS48sBjBbi9IrcF84sNW0y7oAaIBwJr8Md644vaTbheUWEZ2ZVgs45IipLm Dm/4wD5DZcY73nziKTgOWtdxr5Vdt8RxIjfL2dAhYvjf+H8nv+dsK58xXy46p1EBhSud LO/oaVL9thwppvft/G+fgYMdLlauJ/RPKOdc2ZAKAZYgRx8fenl5WhsWIA+nbeBNsfdB SYWBZxO0vFU6W465QBKgz/zrW2mkWR7/AWcGXrDCE1Np0vsqRIBmB3Ycu4MPyMi0lESr Nm7w== X-Gm-Message-State: AOAM53396AkYa7gfFTUq8X/MARTy04BKcy9/P86K/INrJun/VrK//raN FO4Kp0yI98TxZApIjK9Nbdc= X-Google-Smtp-Source: ABdhPJzGfExcyEzBTqT2c1yhn2GYKZeDXriQpNhaE68D/XaNMVMP3oOM31h06oE1yCn4oOGwXB7rVg== X-Received: by 2002:a05:651c:491:: with SMTP id s17mr9015050ljc.300.1610918933681; Sun, 17 Jan 2021 13:28:53 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-164.NA.cust.bahnhof.se. [158.174.22.164]) by smtp.gmail.com with ESMTPSA id s19sm1678858lfc.41.2021.01.17.13.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 13:28:53 -0800 (PST) From: Rikard Falkeborn To: Will Deacon , Mark Rutland , Shaokun Zhang Subject: [PATCH 3/4] perf: hisi: Constify static struct attribute_group Date: Sun, 17 Jan 2021 22:28:46 +0100 Message-Id: <20210117212847.21319-4-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210117212847.21319-1-rikard.falkeborn@gmail.com> References: <20210117212847.21319-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210117_162855_152598_A56E7A93 X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Sascha Hauer , Frank Li , linux-kernel@vger.kernel.org, Rikard Falkeborn , Bjorn Andersson , Andy Gross , NXP Linux Team , Pengutronix Kernel Team , linux-arm-msm@vger.kernel.org, Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The only usage is to put their addresses in an array of pointers to const struct attribute group. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c index 5ac6c9113767..ac1a8c120a00 100644 --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c @@ -319,7 +319,7 @@ static struct attribute *hisi_ddrc_pmu_identifier_attrs[] = { NULL }; -static struct attribute_group hisi_ddrc_pmu_identifier_group = { +static const struct attribute_group hisi_ddrc_pmu_identifier_group = { .attrs = hisi_ddrc_pmu_identifier_attrs, }; diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c index 41b2dceb5f26..3402f1a395a8 100644 --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c @@ -331,7 +331,7 @@ static struct attribute *hisi_hha_pmu_identifier_attrs[] = { NULL }; -static struct attribute_group hisi_hha_pmu_identifier_group = { +static const struct attribute_group hisi_hha_pmu_identifier_group = { .attrs = hisi_hha_pmu_identifier_attrs, }; diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c index 705501d18d03..7d792435c2aa 100644 --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c @@ -321,7 +321,7 @@ static struct attribute *hisi_l3c_pmu_identifier_attrs[] = { NULL }; -static struct attribute_group hisi_l3c_pmu_identifier_group = { +static const struct attribute_group hisi_l3c_pmu_identifier_group = { .attrs = hisi_l3c_pmu_identifier_attrs, };