lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 8 Nov 2023 12:11:23 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     "wuqiang.matt" <wuqiang.matt@...edance.com>
Cc:     linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
        lkp@...el.com, mattwu@....com
Subject: Re: [PATCH v1] lib: test_objpool: make global variables static

On Wed,  8 Nov 2023 09:22:48 +0800
"wuqiang.matt" <wuqiang.matt@...edance.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@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202311071229.WGrWUjM1-lkp@intel.com/
> 

Looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Let me pick this to probes/fixes.

Thank you,

> Signed-off-by: wuqiang.matt <wuqiang.matt@...edance.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
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ