mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xtensa: only build __strncpy_user with CONFIG_ARCH_HAS_STRNCPY_FROM_USER
@ 2023-06-09 15:30 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2023-06-09 15:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Zankel, Max Filippov

__strncpy_user is only used when CONFIG_ARCH_HAS_STRNCPY_FROM_USER is
enabled so don't build the source when it's off.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 arch/xtensa/lib/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/lib/Makefile b/arch/xtensa/lib/Makefile
index c9c2614188f7..6e5b2232668c 100644
--- a/arch/xtensa/lib/Makefile
+++ b/arch/xtensa/lib/Makefile
@@ -6,7 +6,8 @@
 lib-y	+= memcopy.o memset.o checksum.o \
 	   ashldi3.o ashrdi3.o bswapdi2.o bswapsi2.o lshrdi3.o \
 	   divsi3.o udivsi3.o modsi3.o umodsi3.o mulsi3.o umulsidi3.o \
-	   usercopy.o strncpy_user.o strnlen_user.o
+	   usercopy.o strnlen_user.o
+lib-$(CONFIG_ARCH_HAS_STRNCPY_FROM_USER) += strncpy_user.o
 lib-$(CONFIG_PCI) += pci-auto.o
 lib-$(CONFIG_KCSAN) += kcsan-stubs.o
 KCSAN_SANITIZE_kcsan-stubs.o := n
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-09 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 15:30 [PATCH] xtensa: only build __strncpy_user with CONFIG_ARCH_HAS_STRNCPY_FROM_USER Max Filippov

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®