From nobody Fri Apr 10 21:56:16 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71336C3F6B0 for ; Thu, 18 Aug 2022 21:00:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346162AbiHRU76 (ORCPT ); Thu, 18 Aug 2022 16:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345738AbiHRU7o (ORCPT ); Thu, 18 Aug 2022 16:59:44 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1CA975CDC for ; Thu, 18 Aug 2022 13:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=+uEFMpnvquJHyLZzwS5tS5zdX9I OGYbVSYKYhXG4Bbk=; b=VR6HwAMTn6Fq3YFYUS3Y/TN34XsGNTbivHK02wTSEVr GI9PUMMVYg/NAqYBI5Q/VdMVRdFVhn5iXGaHY9r5YcDj6KmmBPFNJFujlw5QQz94 P28+lSY1vrJSHN5jbXu/nbJZIq2+9ssXEPgcF/fiHBrWR1gkAQKV4+zLYOe2B114 = Received: (qmail 3959005 invoked from network); 18 Aug 2022 22:59:42 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 22:59:42 +0200 X-UD-Smtp-Session: l3s3148p1@9aWlQormIogucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org Subject: [PATCH] m68k: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 22:59:41 +0200 Message-Id: <20220818205941.6240-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=3DwgfRnXz0W3D37d01q3JFkr_i_uTL=3DV6A6= G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- arch/m68k/kernel/setup_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c index e62fa8f2149b..06ee394db610 100644 --- a/arch/m68k/kernel/setup_mm.c +++ b/arch/m68k/kernel/setup_mm.c @@ -148,7 +148,7 @@ static void __init m68k_parse_bootinfo(const struct bi_= record *record) break; =20 case BI_COMMAND_LINE: - strlcpy(m68k_command_line, data, + strscpy(m68k_command_line, data, sizeof(m68k_command_line)); break; =20 --=20 2.35.1