Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp898285rwb; Thu, 18 Aug 2022 14:26:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Bm+IQhNsRFEPYr+vO3i0P/Oa1bF+1FsDHtP2hA+D3eERAo5+9HI1BvP/IzPttR/FHaD3E X-Received: by 2002:a17:907:2e0b:b0:730:8aee:d674 with SMTP id ig11-20020a1709072e0b00b007308aeed674mr3056807ejc.104.1660857965696; Thu, 18 Aug 2022 14:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660857965; cv=none; d=google.com; s=arc-20160816; b=gjq7SOjNuErbRCrzhy3Zf1YIL3pYNjqYuh82DxzAIhiIpvzZJD5o2zGi+Ho90Dxi0r vCPjDzORVQ5d98Xrf83V8N6W8MwsVglXROF9Dg0HouLMqwrLJZL0tLfqeQCBevl3MFp7 P1KYybEV9yAQvgc7ZURBkBDo0l35sYZyuAOQZUfcWoK4P2nX6foqW8Ttc+r7McDp3tik NFcjOnpfqEKXTKmTcF064w1dCM4Yu5gbM83ru2mQaH+S0rvI44Rp6He7EpYRSvKvN9fT 9awyokXWjg2+DlBAgOruRaZjF4gDdkmybEaFXWPI+Y8sjhWVkPBYtJr0rFY8dkRQYEm3 rwsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/WzDl0onw5XhytYelQru8KPth1BDX8q4Myo6IO7Ca4c=; b=zjqB33cK3hODKRSlUTEmEY8jCKzdp8uu1ZDDilK5kbTLRPAv1qIPzKwCIHWTcTWoG3 OflMfbleHuuN6Ns5kXhkquw52/Qm4T6ynX8+8kIeko9P+Ix3PYcisS/tkCHcuNPtvPi6 //fBF4kLLufqzGBoAdkPcTFu2uJ5ESeJblIBHT0dVq0i4pxiafbdwkduioY6MfmPv0l9 35grThHBDjf4tMVHfwyOWCoIFgrvDyEZBDmoGI57/34ChgJfadFWHiGM8kwKD6J1rvrY XgHJnxoxKBULH7gDZKr38SyMdbBGapOA8BO8D4q+Ng3dt5m6VgiiXLcTRke5nVqzLrLW u8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=jT6PWnPa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a1709065e0800b00730947701dbsi1474432eju.485.2022.08.18.14.25.38; Thu, 18 Aug 2022 14:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=jT6PWnPa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346103AbiHRU7v (ORCPT + 99 others); Thu, 18 Aug 2022 16:59:51 -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 S241265AbiHRU7m (ORCPT ); Thu, 18 Aug 2022 16:59:42 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E5FB8A42 for ; Thu, 18 Aug 2022 13:59:41 -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=uqAMurVQ68jCqbOzNUyGYpDGOfQ U1eoj0QzyvgcQXVY=; b=jT6PWnPaRt/uD5SR4QhORSfqR/cpx0nVze8n6JVsiAm cJur4CgoSAGcz3qspdjEi7oSjFLxMOuxV3gkrI9b9XrGllgUISRnp8ULv+a5co2P jsXYgYQfmwmgxCMu0DXRCpqq+7BC/yeXfMRnkKAoLYGuNgV1yXsPeywfux/5aLjs = Received: (qmail 3958946 invoked from network); 18 Aug 2022 22:59:39 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 22:59:39 +0200 X-UD-Smtp-Session: l3s3148p1@1NB9Qormm8oucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Brian Cain , linux-hexagon@vger.kernel.org Subject: [PATCH] hexagon: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 22:59:38 +0200 Message-Id: <20220818205938.6192-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang --- arch/hexagon/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/hexagon/kernel/setup.c b/arch/hexagon/kernel/setup.c index 1880d9beaf2b..621674e86232 100644 --- a/arch/hexagon/kernel/setup.c +++ b/arch/hexagon/kernel/setup.c @@ -66,9 +66,9 @@ void __init setup_arch(char **cmdline_p) on_simulator = 0; if (p[0] != '\0') - strlcpy(boot_command_line, p, COMMAND_LINE_SIZE); + strscpy(boot_command_line, p, COMMAND_LINE_SIZE); else - strlcpy(boot_command_line, default_command_line, + strscpy(boot_command_line, default_command_line, COMMAND_LINE_SIZE); /* @@ -76,7 +76,7 @@ void __init setup_arch(char **cmdline_p) * are both picked up by the init code. If no reason to * make them different, pass the same pointer back. */ - strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); + strscpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); *cmdline_p = cmd_line; parse_early_param(); -- 2.35.1