From nobody Fri Nov 29 23:33:24 2024 Received: from sonic308-20.consmr.mail.sg3.yahoo.com (sonic308-20.consmr.mail.sg3.yahoo.com [106.10.241.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E5D114883F for ; Fri, 13 Sep 2024 19:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=106.10.241.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726256005; cv=none; b=fDS2tleEoOoP/HzYIv+SLDgKur0B972pYZA06Uxd8u+DzROjybSbImBFEQ3m21P1AtM8brRRT1K+enGkOozPwlxjhctWUidF/IgF47s7DXESS8OkzD44LCyEi/vCWJgxHrYXeveWGktZ+XzpwpqBU6Efujo8TRNIOQrsVIJ40S8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726256005; c=relaxed/simple; bh=Yw3776WKS9ia5etI8DbaKho23ePP64KPB8wqyVoPAT4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=ewbZ8CivCgJVsqEH+If4+CppKpU79/3wX/Z72uceOulCg48Y6N2t+/qttnNpymAO+vbpw3/tsil46RX6uNYWIBcMdYgdey2qSMvgM7zTg4Q7uljGe3F/HkDmQn77co7p5kNKjd/xyjUqPmrNjsPDa1B8YzV8UOJygkT4bXhTjuU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com; spf=pass smtp.mailfrom=myyahoo.com; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b=fx1uk+4I; arc=none smtp.client-ip=106.10.241.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b="fx1uk+4I" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=myyahoo.com; s=s2048; t=1726255996; bh=DRskhHXVllGtD1jjaKx3voZH0LlbhZ3PTYPp3M4Mee4=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=fx1uk+4IL557ZQzmSLCbXPi71eOLMmPkp/sGq3duBICFYuI6endSISOv7vngtKbavONXvHmz3FMRVuaFZ4OASHaQuXX9GFsLao9B/GZC/d2fsSzqVdJIQ6gdMGXS6R8M2lB3aGxzF+IOnJlBeV7qnXMiyMDP2B4JAuj3IXztaKL+LzNpIv/sPVfDuaITnYlzl23I0LuJetFexGrslvz6hlKxuq3QMvVOrElwU1jlLoMzDoW74zHXcdkrYrhCSAG8Io9ThyFShxr0F0q+jxbn6LVn+S3i3/QsZWpcNqXxWgRD5NylUXNrZQscFGH4Pmjl5CB4wJroqPtK8xjVwTDGwQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1726255996; bh=Osvm9adnvC9uydBape1+7kP2uYovEWZqcP1yt6y/dYD=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=jdaTrAc2TYGevbFbFR6lxJLE6S/frCUtSBzXtRv/lJkvT3oIvbPFgZber+Wb/h13gv5RZKi8brFuMKhYQ2neXWZ24C8cH7gdE2ZpyOtbPKiKn6gn47cPxmo2r5XCAqG5VtqRqVM8baPTGny9uNtgv77h6UL3CeFS6ppcJ5KBtVkPnNQXeY/b7/fQRwE9BAF4PiDBqBEho6W0aUmgOLVUCGs/drio/NOvSNmmd9L5Jtn7Ab/j4NAGr0bKH/hxo0BgrnLuQJ5/0eJDE9NTNeMGD9ui+8r83faTfnx66cLmAcTPbWEsGz2v139EdgGh5nB7n4MzINIYIMWPUQ9f1SrH5A== X-YMail-OSG: b7v6AUEVM1n8eWHC9tAYUc.EeVk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t5z_s4QgN3ikGYWsHlRpGKedkO 58UsikBQi8aiMJIXb0m2Q0ACxl.DU.VkskqwWYueNd.QF4DSWJekJLVJe.GojtDQcWiXI.tw_WkD DPqF6CK5T7XHAA15FsdCESXtu.9rEoAvAlPsf5X5uSFOGY62.VDJWTyDnFiMSNA-- X-Sonic-MF: X-Sonic-ID: c3f43d41-eb64-4ccd-82cc-425d2756e797 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.sg3.yahoo.com with HTTP; Fri, 13 Sep 2024 19:33:16 +0000 Received: by hermes--production-sg3-fc85cddf6-9p6n9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5341d66e59e0ab8320caf088ee6b6923; Fri, 13 Sep 2024 19:12:55 +0000 (UTC) From: Abdul Rahim To: rafael@kernel.org, christophe.jaillet@wanadoo.fr, rui.zhang@intel.com, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Abdul Rahim Subject: [PATCH] ACPI: thermal: Use strscpy() instead of strcpy() Date: Sat, 14 Sep 2024 00:42:49 +0530 Message-ID: <20240913191249.51822-1-abdul.rahim@myyahoo.com> X-Mailer: git-send-email 2.46.0 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 References: <20240913191249.51822-1-abdul.rahim.ref@myyahoo.com> Content-Type: text/plain; charset="utf-8" strcpy() is generally considered unsafe and use of strscpy() is recommended [1] this fixes checkpatch warning: WARNING: Prefer strscpy over strcpy Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Signed-off-by: Abdul Rahim --- drivers/acpi/thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 78db38c7076e..6671537cb4b7 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -796,9 +796,9 @@ static int acpi_thermal_add(struct acpi_device *device) return -ENOMEM; =20 tz->device =3D device; - strcpy(tz->name, device->pnp.bus_id); - strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS); + strscpy(tz->name, device->pnp.bus_id); + strscpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); + strscpy(acpi_device_class(device), ACPI_THERMAL_CLASS); device->driver_data =3D tz; =20 acpi_thermal_aml_dependency_fix(tz); --=20 2.46.0