From patchwork Sun Jun 2 08:58:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13682734 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (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 5C64540858 for ; Sun, 2 Jun 2024 09:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717318985; cv=none; b=rmRl4bTCJuk70oNHN0HHoLISzaeRao+rjb1gC5H0j6OsPPoGtyZH+aaFBUnmUQehjwta3+CPLn62GdzA8QOfNtfe0sYQ5OaW+xgq5cwczK1OyiAxl1bqFL6HrK2QKmODPx5vhCjJqKALgbHRTwYilL68O/MKNX8vPI3mD3jx5M0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717318985; c=relaxed/simple; bh=kjAyPZMiSO/QOUSk3fdxY5FJ/AeIhJLqhUfXYyQ05PA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m924ZsnGnY58cz7o8pUrmQn+xtTUlaiLY6s1nkURy1dGoYtoqVvITGJNMyGLYpAqlDJFEmiMnSaR0t0FaVy7DNhJD3+9OEfpEXGKVt+IikQmXox8qKo/+09D/3Ry37oxIGizvFdxpPBR0rW9K6WNVgNQH5ZGzy/yk8uQL5jKnEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id e5f4102e-20be-11ef-8d47-005056bd6ce9; Sun, 02 Jun 2024 12:02:54 +0300 (EEST) From: Andy Shevchenko To: Hans de Goede , Andy Shevchenko , Jorge Lopez , Li Zetao , Simon Trimmer , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Pearson , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, linux-input@vger.kernel.org Cc: Corentin Chary , "Luke D. Jones" , Mark Pearson , Henrique de Moraes Holschuh Subject: [PATCH v1 7/7] platform/x86: touchscreen_dmi: Use 2-argument strscpy() Date: Sun, 2 Jun 2024 11:58:00 +0300 Message-ID: <20240602090244.1666360-8-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240602090244.1666360-1-andy.shevchenko@gmail.com> References: <20240602090244.1666360-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/touchscreen_dmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 2d9ca2292ea1..879a63e4ecd0 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -1907,7 +1907,7 @@ static int __init ts_parse_props(char *str) u32 u32val; int i, ret; - strscpy(orig_str, str, sizeof(orig_str)); + strscpy(orig_str, str); /* * str is part of the static_command_line from init/main.c and poking