[PATCH] drm: apple: use strscpy() in place of strlcpy()

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

 



From: Arnd Bergmann <arnd@xxxxxxxx>

Since commit d26270061ae6 ("string: Remove strlcpy()"), the strlcpy()
function causes a build failure.

Since the return value is ignored, changing it to the strscpy()
causes no change in behavior but fixes the build failure.

Fixes: f237c83e4302 ("drm: apple: DCP AFK/EPIC support")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
The apple drm driver is not in mainline linux yet, this patch
is against https://github.com/AsahiLinux/linux/tree/bits/200-dcp
---
 drivers/gpu/drm/apple/afk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/apple/afk.c b/drivers/gpu/drm/apple/afk.c
index 99d579d5ce47..9fbcd18878e8 100644
--- a/drivers/gpu/drm/apple/afk.c
+++ b/drivers/gpu/drm/apple/afk.c
@@ -236,7 +236,7 @@ static void afk_recv_handle_init(struct apple_dcp_afkep *ep, u32 channel,
 		return;
 	}
 
-	strlcpy(name, payload, sizeof(name));
+	strscpy(name, payload, sizeof(name));
 
 	/*
 	 * in DCP firmware 13.2 DCP reports interface-name as name which starts
-- 
2.39.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux