From nobody Sat Feb 7 17:54:41 2026 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EF2826E711 for ; Fri, 14 Nov 2025 16:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763136032; cv=none; b=R01iUoDmwFXuy6xN0yNL/e39Yi4jscA7/2IYp0hNgfoslPKI3DRgNewu8tFEto8tMOFkIagCsJH58A1/VH0ddRlYd73FxFzlYmfSsYX6mLj9J49BPRIc2xWptszC2uXKuNCjofWkRWfgNXNH44HPts4KRagHGAhz6evXOsKeoWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763136032; c=relaxed/simple; bh=XECehUmSI7TK5rOPKBoCkm+0nPhV+OBi+2SN6lu1Qhw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HHB+DLdoMwds7XqGAPzSNhas9OBB7CxALKz0lwZx4fE6XyIbt4RW2212K1VbNIRDSUhe9dSB+uTY8k19VoODvPlhx5TT93iEXVrIRI5D+PBgUpHaIAVNLhH5iP76MXIYupYLDZGyg5gSMQtgbdKYlxgzdwIequBoRFVmPkZwHjw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=DHvxbCky; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DHvxbCky" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763136028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zbOtzsUl4rD3ykr6Of7jeUrXRsx4bYIw63wLmw7EuHM=; b=DHvxbCkyDEG9rMU0lFA3FJA9jxV+Txk4CJo+bfYN67+PHGLF27nyU6vVKTQM5/n/Ct6wgs U19u9Z8Co2UoIH2ZaCRR9ipj/vjgt5/7Akj5M3MBHD9GwuzNOexRPCnTmNdwoPDWGor4sn q/XcQ2yTFTOsgqCQHNThqolHyw7ekQ0= From: Thorsten Blum To: Mauro Carvalho Chehab , Borislav Petkov , Tony Luck Cc: Thorsten Blum , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] EDAC/ghes: Replace deprecated strcpy in ghes_edac_report_mem_error Date: Fri, 14 Nov 2025 17:00:05 +0100 Message-ID: <20251114160004.230025-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" strcpy() is deprecated; use strscpy() instead. No functional changes. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum --- drivers/edac/ghes_edac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 1eb0136c6fbd..d80c88818691 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -15,6 +15,7 @@ #include "edac_module.h" #include #include +#include =20 #define OTHER_DETAIL_LEN 400 =20 @@ -332,7 +333,7 @@ static int ghes_edac_report_mem_error(struct notifier_b= lock *nb, p =3D pvt->msg; p +=3D snprintf(p, sizeof(pvt->msg), "%s", cper_mem_err_type_str(etype)); } else { - strcpy(pvt->msg, "unknown error"); + strscpy(pvt->msg, "unknown error"); } =20 /* Error address */ @@ -357,14 +358,14 @@ static int ghes_edac_report_mem_error(struct notifier= _block *nb, dimm =3D find_dimm_by_handle(mci, mem_err->mem_dev_handle); if (dimm) { e->top_layer =3D dimm->idx; - strcpy(e->label, dimm->label); + strscpy(e->label, dimm->label); } } if (p > e->location) *(p - 1) =3D '\0'; =20 if (!*e->label) - strcpy(e->label, "unknown memory"); + strscpy(e->label, "unknown memory"); =20 /* All other fields are mapped on e->other_detail */ p =3D pvt->other_detail; --=20 2.51.1