From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A929C433EF for ; Fri, 8 Oct 2021 11:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C55A60FC1 for ; Fri, 8 Oct 2021 11:05:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232030AbhJHLHM (ORCPT ); Fri, 8 Oct 2021 07:07:12 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3948 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231841AbhJHLHJ (ORCPT ); Fri, 8 Oct 2021 07:07:09 -0400 Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HQld04Q2qz67T5g; Fri, 8 Oct 2021 19:01:56 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 13:05:12 +0200 Received: from [10.47.80.141] (10.47.80.141) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 12:05:10 +0100 Subject: Re: [PATCH 04/21] perf pmu: Make pmu_event tables const. To: Ian Rogers , Andi Kleen , "Jiri Olsa" , Jin Yao , Namhyung Kim , Kajol Jain , "Paul A . Clarke" , Arnaldo Carvalho de Melo , Riccardo Mancini , Kan Liang , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Kees Cook , "Sami Tolvanen" , Nick Desaulniers , Andrew Morton , "Jacob Keller" , Zhen Lei , ToastC , Joakim Zhang , Felix Fietkau , Jiapeng Chong , Song Liu , "Fabian Hemmer" , Alexander Antonov , Nicholas Fraser , Adrian Hunter , Denys Zagorui , Wan Jiabing , Thomas Richter , "Sumanth Korikkar" , Heiko Carstens , , CC: Stephane Eranian References: <20211007165647.3514803-1-irogers@google.com> <20211007165647.3514803-5-irogers@google.com> From: John Garry Message-ID: Date: Fri, 8 Oct 2021 12:07:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20211007165647.3514803-5-irogers@google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.80.141] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2021 17:56, Ian Rogers wrote: > - bouncing changbin du address > -int arch_get_runtimeparam(struct pmu_event *pe) > +int arch_get_runtimeparam(const struct pmu_event *pe) > { > int count; > char path[PATH_MAX] = "/devices/hv_24x7/interface/"; > diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c > index a31de0f77097..b3431c11c9cb 100644 > --- a/tools/perf/pmu-events/jevents.c > +++ b/tools/perf/pmu-events/jevents.c > @@ -362,7 +362,7 @@ static int close_table; > > static void print_events_table_prefix(FILE *fp, const char *tblname) > { > - fprintf(fp, "struct pmu_event %s[] = {\n", tblname); > + fprintf(fp, "const struct pmu_event %s[] = {\n", tblname); can these be static as well? > close_table = 1; > }