34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From d910da3d3ada3df4059a622a3dd4dbfe71313bcb Mon Sep 17 00:00:00 2001
|
|
From: Phil Sutter <phil@nwl.cc>
|
|
Date: Fri, 25 Mar 2022 18:33:55 +0100
|
|
Subject: [PATCH] include: Silence gcc warning in linux_list.h
|
|
|
|
Compiler complained about empty prefetch() macro:
|
|
|
|
| ../include/linux_list.h:385:66: warning: right-hand operand of comma expression has no effect [-Wunused-value]
|
|
| 385 | for (pos = list_entry((head)->next, typeof(*pos), member), \
|
|
| | ^
|
|
|
|
Use nftables' variant instead which gcc seems to like more.
|
|
|
|
Fixes: 36d2ed3de20a3 ("major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path)")
|
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
(cherry picked from commit 90ba6791824ef761f9f397c05b20a2f102dbe74a)
|
|
---
|
|
include/linux_list.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/include/linux_list.h b/include/linux_list.h
|
|
index de182a4764706..cf71837f18347 100644
|
|
--- a/include/linux_list.h
|
|
+++ b/include/linux_list.h
|
|
@@ -29,7 +29,7 @@
|
|
1; \
|
|
})
|
|
|
|
-#define prefetch(x) 1
|
|
+#define prefetch(x) ((void)0)
|
|
|
|
/* empty define to make this work in userspace -HW */
|
|
#ifndef smp_wmb
|