Message ID | 20231108012248.313574-1-wuqiang.matt@bytedance.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp627428vqo; Tue, 7 Nov 2023 17:26:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgE1JDrOeC9NpSuq98Ju/aAyB4f9GehYZbIW6NuyV1o5ZQHPBVjWUKnnZNjLHpXFlvGxrZ X-Received: by 2002:a05:6a00:140e:b0:6bd:66ce:21d4 with SMTP id l14-20020a056a00140e00b006bd66ce21d4mr358193pfu.23.1699406802534; Tue, 07 Nov 2023 17:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699406802; cv=none; d=google.com; s=arc-20160816; b=BR4/Im9HGmRQQeVWGDoZ99S4lsTfRvsgmJgE+oAbCQy3o8MhhJjJJYxlekVqVabuub 6hN4uYo6qhrhWWtE+cV3CL9ke3D2I3P1p+cYBcK8IBz1eb2QkTICaGaLAzOAxqGRlZnI qcFInSW7JLHSiaUYZijBtADyaVZmf+AafhFiPFf+jkheqCjm/vd8/2ZwtE9hZ5TnYq1j UhR+O2LMiaGqkILb6Veb/m7SMrdD15s3eKqNzH4lL475Knl6P2+AbsQunbbTtI+En1tJ tlFXRDx8/GnBzVefN6KUKTMcTMNzsWn9Ii284JI+S5o9zmyV/GELkUAeE4OrBgfeFkpe ICUQ== 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:dkim-signature; bh=kXOO76hl05hGJXvyn0Dlhgaia7Zq8+Y5vhNHIIQ2qOw=; fh=N37e097VTpiwpFeZGZHfgthRYvR/WjJD0wJaBAjePaw=; b=KbN5DpA6B9xfR29aK9vOnCYnLilz9WL8xFWuCSBNyoCdatuVE1ls4yNVTspTsHfI+j isAVuZjb4Fu9ov2qHEvV0i018XRCXq9LSHTN64NsBLZ58+jLrOkaeGo6/0Trp1s7XcRI h1dXtylX4r+fUQqJ+VfoFF/I6Ukk/UowRnOpPzoUX0km75b2gpMmrOLcDQM/5wJNk1d/ 3ioeEKqYJ9AoowKderadzG3nLa6OstjkGVETUmsMcM2GrmAumxOnnXDZrG185J9O0Pu0 PUvQuHo8qoekx6Ph5eBYbYcjw8nBjCeva8v2eeuNB0EsNCkhBDxPJL8mLogt0opCmJhJ fBvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=b7VdTjge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a6-20020a656046000000b005859c81f1e9si3984337pgp.229.2023.11.07.17.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 17:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=b7VdTjge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 09A398133894; Tue, 7 Nov 2023 17:26:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234189AbjKHBXh (ORCPT <rfc822;lhua1029@gmail.com> + 32 others); Tue, 7 Nov 2023 20:23:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbjKHBXf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Nov 2023 20:23:35 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D020D10CF for <linux-kernel@vger.kernel.org>; Tue, 7 Nov 2023 17:23:08 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3b3f6f330d4so3685803b6e.2 for <linux-kernel@vger.kernel.org>; Tue, 07 Nov 2023 17:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1699406588; x=1700011388; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kXOO76hl05hGJXvyn0Dlhgaia7Zq8+Y5vhNHIIQ2qOw=; b=b7VdTjgeEEZdOBD7nqm7qAy6KOxTPbx7q2rM4wDSJ1WjF7tdfLB2Eu/xalUPbOoPzM lFWtSAslqGjAC5LyOif89tXl3191dJ6A7Zh1x+sy2leS0r4jGBzSb0GzGhZTKGJmbtad 3sN7Sg2CPxjVjOOlUbaB6izmbfvYNEb/8/7xU22qshWkRYUzhjbEyBnkzxGsH4AlRcHC yE8IHaodUjhnN1G4Wfg0V6mc1Z5ZWxz1A57BdsqZzT8NQDXuiUSb0/LLi6nLWgis8fnU zqRNlzobQvUi5jwkoCZgx6uwEjL2IsYfF6GHljWRKHd0C9T0EzsF0IKdX/lItGzNvI2p yaKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699406588; x=1700011388; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kXOO76hl05hGJXvyn0Dlhgaia7Zq8+Y5vhNHIIQ2qOw=; b=Y3lMnBP5VtGOXUYV2YUO1Dp8bCP5kyQnA03jL6hfLVSJfPbV3iE3KMh5g358ftSU+9 o9i7JnPXXyIAy581CXPaFc4Zd8Hxd0nsA10oS0cvy5bj3c0lFUPqXTNoxZ1DNNWQ1cT8 zJdkcn1k9RtxlLvhZQIAa+a4q620Yvrz8tCh/6eZh1VP+/E7OGH7U2LyGccCoaQI0MTf Fucn41nCa91vAxtX5yvDM5JdU7zXQL8fjUoD/zGtC+LBORdQiyonPu7x71ZlgPPsBRIK g/RO4CTXySvodobfAtFe0HD4++tFCaGBqVFRTENSddu/vbPQoMj6xbCrVtODsXd7za8R WraQ== X-Gm-Message-State: AOJu0YyTeAp3BSDaUqItxtqlagOB5Vt11BB0xielz7freq0IIXEx258R s+84Wy4z3QNiy1cwB6CUjgtCBg== X-Received: by 2002:a05:6808:f03:b0:3a7:8f94:743a with SMTP id m3-20020a0568080f0300b003a78f94743amr873721oiw.10.1699406588131; Tue, 07 Nov 2023 17:23:08 -0800 (PST) Received: from devz1.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id g24-20020aa78758000000b006c003d9897bsm7762649pfo.138.2023.11.07.17.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 17:23:07 -0800 (PST) From: "wuqiang.matt" <wuqiang.matt@bytedance.com> To: mhiramat@kernel.org Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, lkp@intel.com, mattwu@163.com, "wuqiang.matt" <wuqiang.matt@bytedance.com> Subject: [PATCH v1] lib: test_objpool: make global variables static Date: Wed, 8 Nov 2023 09:22:48 +0800 Message-Id: <20231108012248.313574-1-wuqiang.matt@bytedance.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 07 Nov 2023 17:26:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781957187494029241 X-GMAIL-MSGID: 1781957187494029241 |
Series |
[v1] lib: test_objpool: make global variables static
|
|
Commit Message
wuqiang.matt
Nov. 8, 2023, 1:22 a.m. UTC
Kernel test robot reported build warnings that structures g_ot_sync_ops,
g_ot_async_ops and g_testcases should be static. These definitions are
only used in test_objpool.c, so make them static
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311071229.WGrWUjM1-lkp@intel.com/
Signed-off-by: wuqiang.matt <wuqiang.matt@bytedance.com>
---
lib/test_objpool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Wed, 8 Nov 2023 09:22:48 +0800 "wuqiang.matt" <wuqiang.matt@bytedance.com> wrote: > Kernel test robot reported build warnings that structures g_ot_sync_ops, > g_ot_async_ops and g_testcases should be static. These definitions are > only used in test_objpool.c, so make them static > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202311071229.WGrWUjM1-lkp@intel.com/ > Looks good to me. Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Let me pick this to probes/fixes. Thank you, > Signed-off-by: wuqiang.matt <wuqiang.matt@bytedance.com> > --- > lib/test_objpool.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib/test_objpool.c b/lib/test_objpool.c > index a94078402138..bfdb81599832 100644 > --- a/lib/test_objpool.c > +++ b/lib/test_objpool.c > @@ -311,7 +311,7 @@ static void ot_fini_sync(struct ot_context *sop) > ot_kfree(sop->test, sop, sizeof(*sop)); > } > > -struct { > +static struct { > struct ot_context * (*init)(struct ot_test *oc); > void (*fini)(struct ot_context *sop); > } g_ot_sync_ops[] = { > @@ -475,7 +475,7 @@ static struct ot_context *ot_init_async_m0(struct ot_test *test) > return sop; > } > > -struct { > +static struct { > struct ot_context * (*init)(struct ot_test *oc); > void (*fini)(struct ot_context *sop); > } g_ot_async_ops[] = { > @@ -632,7 +632,7 @@ static int ot_start_async(struct ot_test *test) > #define NODE_COMPACT sizeof(struct ot_node) > #define NODE_VMALLOC (512) > > -struct ot_test g_testcases[] = { > +static struct ot_test g_testcases[] = { > > /* sync & normal */ > {0, 0, NODE_COMPACT, 1000, 0, 1, 0, 0, "sync: percpu objpool"}, > -- > 2.40.1 >
diff --git a/lib/test_objpool.c b/lib/test_objpool.c index a94078402138..bfdb81599832 100644 --- a/lib/test_objpool.c +++ b/lib/test_objpool.c @@ -311,7 +311,7 @@ static void ot_fini_sync(struct ot_context *sop) ot_kfree(sop->test, sop, sizeof(*sop)); } -struct { +static struct { struct ot_context * (*init)(struct ot_test *oc); void (*fini)(struct ot_context *sop); } g_ot_sync_ops[] = { @@ -475,7 +475,7 @@ static struct ot_context *ot_init_async_m0(struct ot_test *test) return sop; } -struct { +static struct { struct ot_context * (*init)(struct ot_test *oc); void (*fini)(struct ot_context *sop); } g_ot_async_ops[] = { @@ -632,7 +632,7 @@ static int ot_start_async(struct ot_test *test) #define NODE_COMPACT sizeof(struct ot_node) #define NODE_VMALLOC (512) -struct ot_test g_testcases[] = { +static struct ot_test g_testcases[] = { /* sync & normal */ {0, 0, NODE_COMPACT, 1000, 0, 1, 0, 0, "sync: percpu objpool"},