Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp203251pxk; Wed, 23 Sep 2020 00:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3VcSOUrnu7CSvpO70meyPmTfbHgIYo/fAsjljVrP7oMmU4rM3DWNhX0cIO9S2c0EiUrUU X-Received: by 2002:a17:906:aecb:: with SMTP id me11mr9260968ejb.217.1600845677397; Wed, 23 Sep 2020 00:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600845677; cv=none; d=google.com; s=arc-20160816; b=vQvEm73zfOwMkDmyx6Cb1BgjvT2arxd/sDOVJkBmsqMZ/03leI6SLFaj6NJRXNtfES iDml/MWjVuNy+hb33goPOO4HZCLQl2Yux04tfjTuW9vXWmBgsy/y5mhm65y4eaeRPAIM 8L22lmTZJjPFLSquLA1Wf/D6IljgmtwcuSqza5Jf07lUdTz8fLHzA7BHf2663RwJ3WmR SAG1MsZLV7zpoiMtxLh5kklE2zO2mCeNGuWUBVUbfG5/sDZrTPHBbovphawtoEzpj+Nu dqxWv3Jd1S8myLSLpQ+JFnAszJfb8q7ASFPSaQ7uPu+UmbX7phICoCNFw03nXfRG4Oo3 4ZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zM+1OK009128kBfuPp6vMnGhuK0Od4f0Q2LPRQW8WXk=; b=JLs/cWZSLojTURYVTHb75hllsT1LgTIENoJTtFJRDx8B0fngoouzOAUb8dXF6fAO95 Eqp+vEKGlohhqpex1v68hVSJXcpDuWjQB4meqFdOLcYR1nMGIhGGdDZBbLgTTwxtsBwc E9mnEJuMPy6Ofr0GDg5X/PrG5kLJPU2yx5Ts15z+wqi1PJ40BMfZrzdwQEIYa3VFhrpE W3qKTGZZ/TE9nFAdolmxSBRS6VnfATYG8zJGMFzEG3dQNP/+I5yzzHNgDWoHUNoaN0Ll Wf72TmU9Sq7YqeG/HJN/bvNDMGi+IzYZclQTtuRs7vkHS9824UYrv10FKV194XJNZEZB nDsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si12150080ejo.270.2020.09.23.00.20.53; Wed, 23 Sep 2020 00:21:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbgIWHRr (ORCPT + 99 others); Wed, 23 Sep 2020 03:17:47 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57342 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726550AbgIWHRr (ORCPT ); Wed, 23 Sep 2020 03:17:47 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0D831B5F63FC6E501F08; Wed, 23 Sep 2020 15:17:45 +0800 (CST) Received: from huawei.com (10.175.112.208) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 23 Sep 2020 15:17:35 +0800 From: Wang Wensheng To: , , , , , , , , CC: Subject: [PATCH -next v2] powerpc/perf: Fix symbol undeclared warning Date: Wed, 23 Sep 2020 07:14:53 +0000 Message-ID: <20200923071453.2540-1-wangwensheng4@huawei.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.208] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Build kernel with `C=2`: arch/powerpc/perf/isa207-common.c:24:18: warning: symbol 'isa207_pmu_format_attr' was not declared. Should it be static? arch/powerpc/perf/power9-pmu.c:101:5: warning: symbol 'p9_dd21_bl_ev' was not declared. Should it be static? arch/powerpc/perf/power9-pmu.c:115:5: warning: symbol 'p9_dd22_bl_ev' was not declared. Should it be static? Those symbols are used only in the files that define them so we declare them as static to fix the warnings. Signed-off-by: Wang Wensheng --- arch/powerpc/perf/isa207-common.c | 2 +- arch/powerpc/perf/power9-pmu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c index 964437adec18..85dc860b265b 100644 --- a/arch/powerpc/perf/isa207-common.c +++ b/arch/powerpc/perf/isa207-common.c @@ -21,7 +21,7 @@ PMU_FORMAT_ATTR(thresh_stop, "config:32-35"); PMU_FORMAT_ATTR(thresh_start, "config:36-39"); PMU_FORMAT_ATTR(thresh_cmp, "config:40-49"); -struct attribute *isa207_pmu_format_attr[] = { +static struct attribute *isa207_pmu_format_attr[] = { &format_attr_event.attr, &format_attr_pmcxsel.attr, &format_attr_mark.attr, diff --git a/arch/powerpc/perf/power9-pmu.c b/arch/powerpc/perf/power9-pmu.c index 2a57e93a79dc..4a315fad1f99 100644 --- a/arch/powerpc/perf/power9-pmu.c +++ b/arch/powerpc/perf/power9-pmu.c @@ -98,7 +98,7 @@ extern u64 PERF_REG_EXTENDED_MASK; /* PowerISA v2.07 format attribute structure*/ extern struct attribute_group isa207_pmu_format_group; -int p9_dd21_bl_ev[] = { +static int p9_dd21_bl_ev[] = { PM_MRK_ST_DONE_L2, PM_RADIX_PWC_L1_HIT, PM_FLOP_CMPL, @@ -112,7 +112,7 @@ int p9_dd21_bl_ev[] = { PM_DISP_HELD_SYNC_HOLD, }; -int p9_dd22_bl_ev[] = { +static int p9_dd22_bl_ev[] = { PM_DTLB_MISS_16G, PM_DERAT_MISS_2M, PM_DTLB_MISS_2M, -- 2.25.0