[PATCH] samples/bpf: Fix duplicate struct define in test_lru_dist sample

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux