mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sid Kumar <sidhartha.kumar@oracle.com>
To: Ba Jing <bajing@cmss.chinamobile.com>, akpm@linux-foundation.org
Cc: Liam.Howlett@oracle.com, lorenzo.stoakes@oracle.com,
	zhangpeng.00@bytedance.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] shared: linux: remove unused variables
Date: Mon, 23 Sep 2024 10:37:43 -0500	[thread overview]
Message-ID: <f9060eec-5e90-4f27-89bd-c82476ea6213@oracle.com> (raw)
In-Reply-To: <20240903032952.10120-1-bajing@cmss.chinamobile.com>


On 9/2/24 11:29 PM, Ba Jing wrote:
> These variables are never referenced in the code, just remove them.

Hello,

I think these variables are needed and they are referenced in main.c 
within the radix-tree directory. With these lines removed and running 
make within tools/testing/radix-tree I get the following errors:

/usr/bin/ld: 
/home/ubuntu/linux-sidhakum-public/tools/testing/radix-tree/main.c:74:(.text+0x57a): 
undefined reference to `test_verbose'
/usr/bin/ld: main.o: in function `check_copied_tags':
/home/ubuntu/linux-sidhakum-public/tools/testing/radix-tree/main.c:135:(.text+0xc3f): 
undefined reference to `test_verbose'


/home/ubuntu/linux-sidhakum-public/tools/testing/radix-tree/main.c:243:(.text+0x1d68): 
undefined reference to `preempt_count'
/usr/bin/ld: 
/home/ubuntu/linux-sidhakum-public/tools/testing/radix-tree/main.c:243:(.text+0x1d8d): 
undefined reference to `preempt_count'

adding back these variables allows make to run successfully again.

Thanks,

Sidhartha Kumar


>
> Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com>
> ---
>   tools/testing/shared/linux.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/tools/testing/shared/linux.c b/tools/testing/shared/linux.c
> index 17263696b5d8..eb1b1878cf64 100644
> --- a/tools/testing/shared/linux.c
> +++ b/tools/testing/shared/linux.c
> @@ -13,8 +13,6 @@
>   #include <urcu/uatomic.h>
>   
>   int nr_allocated;
> -int preempt_count;
> -int test_verbose;
>   
>   struct kmem_cache {
>   	pthread_mutex_t lock;

  reply	other threads:[~2024-09-23 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03  3:29 Ba Jing
2024-09-23 15:37 ` Sid Kumar [this message]
2024-09-23 15:48   ` Lorenzo Stoakes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9060eec-5e90-4f27-89bd-c82476ea6213@oracle.com \
    --to=sidhartha.kumar@oracle.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bajing@cmss.chinamobile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=zhangpeng.00@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®