From patchwork Sun Jan 17 21:28:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12025755 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 4C240C43381 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 131032076E for ; Sun, 17 Jan 2021 21:30:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 131032076E 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=OSdc0ax4t4eLnnCT0t+C9D7pBT/EEoNpy17k/RYeUDo=; b=EaPC4W14ohc1LIYM+AtxI2j86 v/HcOlXG98FIfzN8F/XsmzAvRD7bGsnpDXHak4f/JSdOt0FGf4HAwfj4rqd3goaYovDcW6QEwcD28 +MY0c0wJ+K5qDfqF25LC1EVTQ0dsRk//Gat2UZVbB9GTDAjnleolJ/ShGf5eCIN7LcMoM4o6bTJsT FkUJvR7GPe5HLfpeb4si5c3zRaZG9OY4zeKkJiWTKl0xtmUXg6zmjOrxDS8RMtg7VyEgbDnk89ZVx hvQRrSbcwY3yKp9YqViAbKz/vGcL1EwWRx+svyZBqwdrdA+OgsV/Mm6sqhGlN55AnRhXYuxZtwRFB 2oQEw0Y3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Fba-0005GD-1x; Sun, 17 Jan 2021 21:29:02 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1FbS-0005EB-QO for linux-arm-kernel@lists.infradead.org; Sun, 17 Jan 2021 21:28:55 +0000 Received: by mail-lj1-x233.google.com with SMTP id f11so16205819ljm.8 for ; Sun, 17 Jan 2021 13:28:52 -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=pGnYP5b1bDIsYHya/pAq0V9WLLrl1QJY4UrDAmDKPYg=; b=nx0SYB/NbD9w9zFZz3U1CvgF3CDr1YdMqMlKZwWnsNpILFdt3vJxJaG1r0q4ezBiTD frNFmGge87M8DY87lZTm8VudMB22VrCoMExUgem4OZAg/4SRrtZBN0VyoSNe+8eZrpxb ROhUvtuAGnPUO5isMD8LJQ/2sNP6MtMpgrmU2IaTFr3T1tYQAQKw8dBvHb6b3iQkFVR/ rqEYyPChZuckA7n4LqVIy3AP9J5kCtMzvT3GIRAaxrJVrs4qQCWq+36vC4fBsFeL8Eh/ ik1JHjrcHolpqNcnvQl8o2EQMiPLTFHH3QKyOMEiCebAkL4i9PKdgLJR/s9pox3svinh 7D6A== 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=pGnYP5b1bDIsYHya/pAq0V9WLLrl1QJY4UrDAmDKPYg=; b=PLd34lhmAWeFHrnrtdK/UBd5RxdCalOfM186Lbvc1SLOYWlRq+LPhcQi0cAkxghPyH +3ZHM6JOduurowOXw5R5XL4RgYCnCADa2lIRCGxB2wNIdmsln1IP3iISuGo0JYBacwCl X7yAytahxwOouQ4Hru8Q7H3aNbSggSn+Ec2vuD2FpxkejjWwldoBwlFUxIZcPcle3NA0 foNCMZzGChyxIkILr6iHuiFk2JQLjLPfmCEhs5NddDilR9B2K1GvQoCK+fSWFouqrYbx zhD5PUQW2GiIvgqGc5nAygeqozoOY2ec8Oj++IDmiJGuVIlGjfEhkGZ4U/8TW6UMuuWt Pm/g== X-Gm-Message-State: AOAM531BlDbOvG9jZCp5J9vwsUYfvn9GX/JTeuVQFAtB9P7zqTuXL5h1 WwFxDBeY0JHtdZoCfbx3Ku8= X-Google-Smtp-Source: ABdhPJyk/IlGV1zlFVOkeqim8MjcwEqd6MBGP3CyNxLvQv4Xmyzv22A20JbND8Mok2BDSpnqWWJ34g== X-Received: by 2002:a2e:2f16:: with SMTP id v22mr9029676ljv.198.1610918931755; Sun, 17 Jan 2021 13:28:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 13:28:51 -0800 (PST) From: Rikard Falkeborn To: Will Deacon , Mark Rutland , Bjorn Andersson , Andy Gross Subject: [PATCH 1/4] perf: qcom: Constify static struct attribute_group Date: Sun, 17 Jan 2021 22:28:44 +0100 Message-Id: <20210117212847.21319-2-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_162854_870841_A15E737D X-CRM114-Status: GOOD ( 13.85 ) 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 , Shaokun Zhang , 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/qcom_l2_pmu.c | 6 +++--- drivers/perf/qcom_l3_pmu.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index 23a0e008dafa..8883af955a2a 100644 --- a/drivers/perf/qcom_l2_pmu.c +++ b/drivers/perf/qcom_l2_pmu.c @@ -649,7 +649,7 @@ static struct attribute *l2_cache_pmu_cpumask_attrs[] = { NULL, }; -static struct attribute_group l2_cache_pmu_cpumask_group = { +static const struct attribute_group l2_cache_pmu_cpumask_group = { .attrs = l2_cache_pmu_cpumask_attrs, }; @@ -665,7 +665,7 @@ static struct attribute *l2_cache_pmu_formats[] = { NULL, }; -static struct attribute_group l2_cache_pmu_format_group = { +static const struct attribute_group l2_cache_pmu_format_group = { .name = "format", .attrs = l2_cache_pmu_formats, }; @@ -700,7 +700,7 @@ static struct attribute *l2_cache_pmu_events[] = { NULL }; -static struct attribute_group l2_cache_pmu_events_group = { +static const struct attribute_group l2_cache_pmu_events_group = { .name = "events", .attrs = l2_cache_pmu_events, }; diff --git a/drivers/perf/qcom_l3_pmu.c b/drivers/perf/qcom_l3_pmu.c index 9ddb577c542b..fb34b87b9471 100644 --- a/drivers/perf/qcom_l3_pmu.c +++ b/drivers/perf/qcom_l3_pmu.c @@ -630,7 +630,7 @@ static struct attribute *qcom_l3_cache_pmu_formats[] = { NULL, }; -static struct attribute_group qcom_l3_cache_pmu_format_group = { +static const struct attribute_group qcom_l3_cache_pmu_format_group = { .name = "format", .attrs = qcom_l3_cache_pmu_formats, }; @@ -663,7 +663,7 @@ static struct attribute *qcom_l3_cache_pmu_events[] = { NULL }; -static struct attribute_group qcom_l3_cache_pmu_events_group = { +static const struct attribute_group qcom_l3_cache_pmu_events_group = { .name = "events", .attrs = qcom_l3_cache_pmu_events, }; @@ -685,7 +685,7 @@ static struct attribute *qcom_l3_cache_pmu_cpumask_attrs[] = { NULL, }; -static struct attribute_group qcom_l3_cache_pmu_cpumask_attr_group = { +static const struct attribute_group qcom_l3_cache_pmu_cpumask_attr_group = { .attrs = qcom_l3_cache_pmu_cpumask_attrs, };