mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liao Chang <liaochang1@huawei.com>
To: <ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
	<martin.lau@linux.dev>, <song@kernel.org>, <yhs@fb.com>,
	<john.fastabend@gmail.com>, <kpsingh@kernel.org>,
	<sdf@google.com>, <haoluo@google.com>, <jolsa@kernel.org>
Cc: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<liaochang1@huawei.com>
Subject: [PATCH] samples/bpf: Fix duplicate struct define in test_lru_dist sample
Date: Fri, 18 Nov 2022 08:47:52 +0800	[thread overview]
Message-ID: <20221118004752.97759-1-liaochang1@huawei.com> (raw)

Build sample/bpf report error as follow:

  CC  ./samples/bpf/test_lru_dist
./samples/bpf/test_lru_dist.c:35:8: error: redefinition of ‘struct list_head’
   35 | struct list_head {
      |        ^~~~~~~~~
In file included from ./samples/bpf/test_lru_dist.c:6:
./tools/include/linux/types.h:84:8: note: originally defined here
   84 | struct list_head {

Remove the duplicate definition of struct list_head in test_lru_dist.c

Signed-off-by: Liao Chang <liaochang1@huawei.com>
---
 samples/bpf/test_lru_dist.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/samples/bpf/test_lru_dist.c b/samples/bpf/test_lru_dist.c
index 5efb91763d65..2e7341044090 100644
--- a/samples/bpf/test_lru_dist.c
+++ b/samples/bpf/test_lru_dist.c
@@ -32,10 +32,6 @@ static int nr_cpus;
 static unsigned long long *dist_keys;
 static unsigned int dist_key_counts;
 
-struct list_head {
-	struct list_head *next, *prev;
-};
-
 static inline void INIT_LIST_HEAD(struct list_head *list)
 {
 	list->next = list;
-- 
2.17.1


             reply	other threads:[~2022-11-18  0:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  0:47 Liao Chang [this message]
2022-11-18 22:29 ` Daniel Borkmann

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=20221118004752.97759-1-liaochang1@huawei.com \
    --to=liaochang1@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=yhs@fb.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®