* [PATCH] drm: apple: use strscpy() in place of strlcpy()
@ 2024-01-22 16:11 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-01-22 16:11 UTC (permalink / raw)
To: Alyssa Rosenzweig
Cc: Thomas Zimmermann, Arnd Bergmann, Sven Peter, Janne Grunau,
Hector Martin, linux-kernel, Maxime Ripard, dri-devel,
Daniel Vetter, Martin Povišer, David Airlie
From: Arnd Bergmann <arnd@arndb.de>
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@arndb.de>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm: apple: use strscpy() in place of strlcpy()
@ 2024-01-22 16:11 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-01-22 16:11 UTC (permalink / raw)
To: Alyssa Rosenzweig
Cc: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Daniel Vetter, Janne Grunau,
Martin Povišer, Hector Martin, Sven Peter, dri-devel,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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@arndb.de>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: apple: use strscpy() in place of strlcpy()
2024-01-22 16:11 ` Arnd Bergmann
@ 2024-01-22 20:51 ` Janne Grunau
-1 siblings, 0 replies; 4+ messages in thread
From: Janne Grunau @ 2024-01-22 20:51 UTC (permalink / raw)
To: Arnd Bergmann, Alyssa Rosenzweig
Cc: Thomas Zimmermann, Arnd Bergmann, Sven Peter, Hector Martin, LKML,
Maxime Ripard, dri-devel, Daniel Vetter, Martin Povišer,
David Airlie
Hej,
On Mon, Jan 22, 2024, at 17:11, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@arndb.de>
> ---
> 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
thanks, patch included in my dev branch and will be in the next pull request I'll send to Hector.
best regards,
Janne
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: apple: use strscpy() in place of strlcpy()
@ 2024-01-22 20:51 ` Janne Grunau
0 siblings, 0 replies; 4+ messages in thread
From: Janne Grunau @ 2024-01-22 20:51 UTC (permalink / raw)
To: Arnd Bergmann, Alyssa Rosenzweig
Cc: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Daniel Vetter,
Martin Povišer, Hector Martin, Sven Peter, dri-devel, LKML
Hej,
On Mon, Jan 22, 2024, at 17:11, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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@arndb.de>
> ---
> 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
thanks, patch included in my dev branch and will be in the next pull request I'll send to Hector.
best regards,
Janne
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-22 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 16:11 [PATCH] drm: apple: use strscpy() in place of strlcpy() Arnd Bergmann
2024-01-22 16:11 ` Arnd Bergmann
2024-01-22 20:51 ` Janne Grunau
2024-01-22 20:51 ` Janne Grunau
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.