[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250820103655.761221-2-thorsten.blum@linux.dev>
Date: Wed, 20 Aug 2025 12:36:52 +0200
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86/olpc/xo15/sci: Replace deprecated strcpy() in xo15_sci_add()
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
---
arch/x86/platform/olpc/olpc-xo15-sci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c
index 68244a3422d1..82c51b6ec528 100644
--- a/arch/x86/platform/olpc/olpc-xo15-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo15-sci.c
@@ -7,6 +7,7 @@
#include <linux/device.h>
#include <linux/slab.h>
+#include <linux/string.h>
#include <linux/workqueue.h>
#include <linux/power_supply.h>
#include <linux/olpc-ec.h>
@@ -144,8 +145,8 @@ static int xo15_sci_add(struct acpi_device *device)
if (!device)
return -EINVAL;
- strcpy(acpi_device_name(device), XO15_SCI_DEVICE_NAME);
- strcpy(acpi_device_class(device), XO15_SCI_CLASS);
+ strscpy(acpi_device_name(device), XO15_SCI_DEVICE_NAME);
+ strscpy(acpi_device_class(device), XO15_SCI_CLASS);
/* Get GPE bit assignment (EC events). */
status = acpi_evaluate_integer(device->handle, "_GPE", NULL, &tmp);
--
2.50.1
Powered by blists - more mailing lists