public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: fixed compile tools/virtio error "__user" redefined [-Werror]
@ 2025-01-09  8:43 Yufeng Wang
  2025-01-09  9:14 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Yufeng Wang @ 2025-01-09  8:43 UTC (permalink / raw)
  To: Kees Cook, Andrew Morton, Nathan Chancellor, Jakub Kicinski,
	Petr Pavlu, Yafang Shao, Jan Hendrik Farr, Tony Ambardar,
	Alexander Potapenko, Uros Bizjak, Shunsuke Mie
  Cc: linux-kernel, Yufeng Wang, stable

we use -Werror now, and warnings break the build so let's fixed it.

from virtio_test.c:17:
./linux/../../../include/linux/compiler_types.h:48: error: "__user" redefined [-Werror]
48 | # define __user BTF_TYPE_TAG(user)
|
In file included from ../../usr/include/linux/stat.h:5,
from /usr/include/x86_64-linux-gnu/bits/statx.h:31,
from /usr/include/x86_64-linux-gnu/sys/stat.h:465,
from virtio_test.c:12:
../include/linux/types.h:56: note: this is the location of the previous definition
56 | #define __user

Cc: stable@vger.kernel.org

Signed-off-by: Yufeng Wang <wangyufeng@kylinos.cn>
---
 include/linux/compiler_types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 5d6544545658..3316e56140d6 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -54,6 +54,7 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
 # ifdef STRUCTLEAK_PLUGIN
 #  define __user	__attribute__((user))
 # else
+#  undef __user
 #  define __user	BTF_TYPE_TAG(user)
 # endif
 # define __iomem
-- 
2.34.1


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

end of thread, other threads:[~2025-01-13  2:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09  8:43 [PATCH] tools: fixed compile tools/virtio error "__user" redefined [-Werror] Yufeng Wang
2025-01-09  9:14 ` Greg KH
2025-01-13  2:34   ` Hao Ge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox