mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] samples/bpf: Fix duplicate struct define in test_lru_dist sample
@ 2022-11-18  0:47 Liao Chang
  2022-11-18 22:29 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Liao Chang @ 2022-11-18  0:47 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa
  Cc: bpf, linux-kernel, liaochang1

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-18 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18  0:47 [PATCH] samples/bpf: Fix duplicate struct define in test_lru_dist sample Liao Chang
2022-11-18 22:29 ` Daniel Borkmann

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®