From nobody Sat Nov 30 02:27:49 2024 Received: from sonic314-20.consmr.mail.sg3.yahoo.com (sonic314-20.consmr.mail.sg3.yahoo.com [106.10.240.144]) (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 7CB1C18BC33 for ; Thu, 12 Sep 2024 20:59:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=106.10.240.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726174790; cv=none; b=ZIj9PjEyTSHQwn5gp+OmqPjiGXovorNPwK85HtOe6A9/v2cxY8HMJzZjJJYRj00uii2MGWte0Jm/ta6XCEOyWSwcf80zSQGeKuYrJpo+I+cZyD044LhPzkdlWY+7LfBwNRJF8Oips85ls3rIgS18Rfmf/jfzJGkN3ILYX1ffJuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726174790; c=relaxed/simple; bh=LUsjhXjA8R09WUdrhbG2u2DIfwEBw3KH4drZdVkfRkw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=URrzLDW07NkRBZ3FoV5WDndez+QTIrNE6i+ageKvgLtmPYIjYgUI/uyBaU/vNwpZjZUxHgXJMdYCyR9I6MMdwuXEdDFFE+VOfTa/ESZBS4WTbxH6c0YG1b64p/9BOhT5OSPqu78nivPb7Izeu3VOuIpFRpOVW+3mcDQiOA1js9c= 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=mQcIUfKt; arc=none smtp.client-ip=106.10.240.144 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="mQcIUfKt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=myyahoo.com; s=s2048; t=1726174780; bh=94Q9a+075SmQezW4neaY7XefCzLDWbgo6ES4DknRTgA=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=mQcIUfKtLrTXePBg+fwavuxMbm3lauqx3nAkvAGaWXIYN8+CJFTsTMs70Mvyw/Az1lSa+NoFh479z64U52SIeZXY7/fRurZ/cJ93erG6A0XCMecHcQzur+QcSWtBG7UGUctVElLVkh3UkBRZhLSjpd/kDbpdvy2mA0pR7Qom4e9BsCMGg6l5pM4PUVj7lL5iznEqz1pggA7AOdbliN2fD2rssL439AbDArqBEaBRdQVOOGE0VBfrzxeC5vFzsXr4SsINphyOn8YhnQuwmK6D8F1u6KJhJtf/qxc9bYvBebt4ZXr7X+qzxfGk9DjTfew0exxVbDOUc1CCbGc+6Q+n4Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1726174780; bh=NpjoOtpyGcgR8z2Jm7mOj1Ibd+7s4NyyEcaphKJLAD/=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=JJugJVHzZdpqMuWBHOua1cAcJsMfu9g1T1w4785QT6HHFnTtWIf09mnIRxXhhd4FYVcobPCjSqkYAoe7y0T19y6F2LkYKCbLzwbIUSYO4cXZxUyuZcu1n5AxTg8+fl5silsO7mJypyrftrPSPBenQ0aA9yjHAftBug6CpJ5Fbuj0RlSvZl6VfTOXw8HCmBP0zvdz7t9/t4jPnAfd/LEJEtWK12/l8Gn3UpOqvKXjWVyai+3fBJq2Xl9dIzUPcTTL+9IhZ9F7Sn+nXUephYE4zZIpr4gRBOtionXY1im11HsVcIK08D2WXKBBJmRzypIYxJZVvtOrVB0VoYgtMO2TVg== X-YMail-OSG: zzC_1M0VM1kY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0hVfqOkLbq7eCq_NR3bIQ2XNlu_aeq.dzsmm 56boAag3Ou04QPD7lroAjo0t_06jtbE4DU8Ui4WlSXmAZ0TB9m3.rbrCO63mvXrd_i3NvGriu5G_ VsKuXVWC_ZJerXxaXCM_oJTOfDH1vB4tkpC5VvdzbYUuANxAu2VZ6oWZKogHS X-Sonic-MF: X-Sonic-ID: 537d67d4-8153-420b-bf00-c0f2bfaf22a7 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.sg3.yahoo.com with HTTP; Thu, 12 Sep 2024 20:59:40 +0000 Received: by hermes--production-sg3-fc85cddf6-qj99b (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 936a2007f212483d89f3628f4710acfa; Thu, 12 Sep 2024 20:59:36 +0000 (UTC) From: Abdul Rahim To: rafael@kernel.org, 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: Fri, 13 Sep 2024 02:29:22 +0530 Message-ID: <20240912205922.302036-1-abdul.rahim@myyahoo.com> X-Mailer: git-send-email 2.43.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: <20240912205922.302036-1-abdul.rahim.ref@myyahoo.com> Content-Type: text/plain; charset="utf-8" thermal: prefer strscpy() over strcpy() 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..a35e40976763 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, MAX_ACPI_DEVI= CE_NAME_LEN); + strscpy(acpi_device_class(device), ACPI_THERMAL_CLASS); device->driver_data =3D tz; =20 acpi_thermal_aml_dependency_fix(tz); --=20 2.43.0