From nobody Sun Feb 8 01:51:55 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 669A4C001B0 for ; Wed, 26 Jul 2023 10:18:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233527AbjGZKSF (ORCPT ); Wed, 26 Jul 2023 06:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbjGZKSB (ORCPT ); Wed, 26 Jul 2023 06:18:01 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80058E7 for ; Wed, 26 Jul 2023 03:18:00 -0700 (PDT) Received: from dggpemm500016.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4R9qYh3sfczVk27; Wed, 26 Jul 2023 18:16:24 +0800 (CST) Received: from huawei.com (10.67.174.205) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 26 Jul 2023 18:17:58 +0800 From: Chen Jiahao To: , , , , , CC: Subject: [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static Date: Wed, 26 Jul 2023 10:17:59 +0000 Message-ID: <20230726101759.2537372-1-chenjiahao16@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.205] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There is a sparse warning shown as below: samples/hw_breakpoint/data_breakpoint.c:24:19: warning: symbol 'sample_hbp' was not declared. Should it be static? Since 'sample_hbp' is only called within data_breakpoint.c, mark it as static to fix the warning. Fixes: 44ee63587dce ("percpu: Add __percpu sparse annotations to hw_breakpo= int") Signed-off-by: Chen Jiahao --- samples/hw_breakpoint/data_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoin= t/data_breakpoint.c index 9debd128b2ab..2f64b89f14da 100644 --- a/samples/hw_breakpoint/data_breakpoint.c +++ b/samples/hw_breakpoint/data_breakpoint.c @@ -21,7 +21,7 @@ #include #include =20 -struct perf_event * __percpu *sample_hbp; +static struct perf_event * __percpu *sample_hbp; =20 static char ksym_name[KSYM_NAME_LEN] =3D "jiffies"; module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO); --=20 2.34.1