From nobody Mon Apr 6 13:28:21 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 62A12C07E9D for ; Tue, 27 Sep 2022 16:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232594AbiI0QBv (ORCPT ); Tue, 27 Sep 2022 12:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232363AbiI0QBh (ORCPT ); Tue, 27 Sep 2022 12:01:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D698D01C4 for ; Tue, 27 Sep 2022 09:01:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 99F6961A8B for ; Tue, 27 Sep 2022 16:01:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E5F1C433B5; Tue, 27 Sep 2022 16:01:32 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1odD2g-00G2og-1v; Tue, 27 Sep 2022 12:02:42 -0400 Message-ID: <20220927160242.207148054@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 27 Sep 2022 12:02:19 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Daniel Bristot de Oliveira , , Zeng Heng Subject: [for-next][PATCH 03/20] rv/monitors: add static qualifier for local symbols References: <20220927160216.349640304@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Zeng Heng The sparse tool complains as follows: kernel/trace/rv/monitors/wwnr/wwnr.c:18:19: warning: symbol 'rv_wwnr' was not declared. Should it be static? The `rv_wwnr` symbol is not dereferenced by other extern files, so add static qualifier for it. So does wip module. Link: https://lkml.kernel.org/r/20220824034357.2014202-2-zengheng4@huawei.c= om Cc: Fixes: ccc319dcb450 ("rv/monitor: Add the wwnr monitor") Fixes: 8812d21219b9 ("rv/monitor: Add the wip monitor skeleton created by d= ot2k") Signed-off-by: Zeng Heng Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) --- kernel/trace/rv/monitors/wip/wip.c | 4 ++-- kernel/trace/rv/monitors/wwnr/wwnr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace/rv/monitors/wip/wip.c b/kernel/trace/rv/monitors/= wip/wip.c index 83cace53b9fa..1a989bc142f3 100644 --- a/kernel/trace/rv/monitors/wip/wip.c +++ b/kernel/trace/rv/monitors/wip/wip.c @@ -16,7 +16,7 @@ =20 #include "wip.h" =20 -struct rv_monitor rv_wip; +static struct rv_monitor rv_wip; DECLARE_DA_MON_PER_CPU(wip, unsigned char); =20 static void handle_preempt_disable(void *data, unsigned long ip, unsigned = long parent_ip) @@ -60,7 +60,7 @@ static void disable_wip(void) da_monitor_destroy_wip(); } =20 -struct rv_monitor rv_wip =3D { +static struct rv_monitor rv_wip =3D { .name =3D "wip", .description =3D "wakeup in preemptive per-cpu testing monitor.", .enable =3D enable_wip, diff --git a/kernel/trace/rv/monitors/wwnr/wwnr.c b/kernel/trace/rv/monitor= s/wwnr/wwnr.c index 599225d9cf38..a063b93c6a1d 100644 --- a/kernel/trace/rv/monitors/wwnr/wwnr.c +++ b/kernel/trace/rv/monitors/wwnr/wwnr.c @@ -15,7 +15,7 @@ =20 #include "wwnr.h" =20 -struct rv_monitor rv_wwnr; +static struct rv_monitor rv_wwnr; DECLARE_DA_MON_PER_TASK(wwnr, unsigned char); =20 static void handle_switch(void *data, bool preempt, struct task_struct *p, @@ -59,7 +59,7 @@ static void disable_wwnr(void) da_monitor_destroy_wwnr(); } =20 -struct rv_monitor rv_wwnr =3D { +static struct rv_monitor rv_wwnr =3D { .name =3D "wwnr", .description =3D "wakeup while not running per-task testing model.", .enable =3D enable_wwnr, --=20 2.35.1