Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp915011rwb; Thu, 18 Aug 2022 14:50:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Ju3AeLH7VQNDnKazyWY2MJU/QIH6mBz+5nvN66H0lsu8L/GzVV1ViPEE4kXDgWBQQqTdi X-Received: by 2002:a63:6116:0:b0:41c:680b:f18d with SMTP id v22-20020a636116000000b0041c680bf18dmr3731384pgb.423.1660859411411; Thu, 18 Aug 2022 14:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660859411; cv=none; d=google.com; s=arc-20160816; b=Vz1Jo8p0DaH5AtM7qh3PvOm/Z/TTJiS+LyGrDGINb5cqp+qiTeFnsBJuDhXi44tG0D Ga6V0xpZZpaczhim4JXn8k+hAg7d2fyWpmDi0Y1H1TLJh4c412suoY2eFt5ntqb5qoX3 Y6FPsoo/xH2tsWpa0coWYA/C5tQmaYfyi2ypyHG80mEyiF79CxOb/1TanHAvw7+ap/8c j5ttJqBXDUOffhoZQR0n8CGEJCfRic5K/Amhg9BkvIZchLSavT9Dvlwn4pck8VU6QQ0I dyV6kLRrxemzOo/qK6cE/okVmoEX3U8wvhEXyToDlUiA2ymnqxQk7tLZCAo6vYSLaQfo VAuA== 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=anuOwuahfO1najw6SPR6sS7x3bk7VbhGDsvWp7Nw8kA=; b=tpkGT2TsKAQ4R7vs30iSCZlvWQ28oLS3mkIXlw3FbNLU/KEHLxkJNxdvLTW1GtluQb T26uN86uRKuNcoKo14hHg23yuqChmDdDnPfl6XMbQe5EoKGrL9/0DbReBzSgkj2cy35B d+1BtNUbG7s5CFPqG48KKfPwNdxrOHQhysapL4r1lAWZ8TADqdb1qfSO9TQ8cvy6G+nE faUw15j++TgzVjGtJ9oTLjPiNVreNa6wt+jtMqsFC2kPnGlcgNIJNSkdoJQTJuCCHP45 XT27S/W7CnQyCzgHw2J0lq+ihsjOJV6DIfE0obn569eBgBdJI2TUIR0dzzLQYpJe4i53 h/RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=FWqiZpfE; 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 ct15-20020a056a000f8f00b00534b83880f5si2352833pfb.68.2022.08.18.14.50.00; Thu, 18 Aug 2022 14:50:11 -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=FWqiZpfE; 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 S1346384AbiHRVGJ (ORCPT + 99 others); Thu, 18 Aug 2022 17:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346420AbiHRVFD (ORCPT ); Thu, 18 Aug 2022 17:05:03 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31C5D9D48 for ; Thu, 18 Aug 2022 14:02:21 -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=VfRpgXXyH/gof572BI+aTk69d7i aEXbOsvqamG8u6Wc=; b=FWqiZpfEw2rGHOANhYj51G6ATwy+kbwjZXgl/3x0W6C YN9nrOVADwYuLdQTgfXe5KLrz15RuQXjxefWnMv3I+1d0LlregfET02CQ01YOK8D XG1qGRFkPnmfKGWIaWLzPVRGZNBSP92vxPsOVSPpmRVRLTChFDIZfkR87nT0dLSU = Received: (qmail 3961095 invoked from network); 18 Aug 2022 23:00:56 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:00:56 +0200 X-UD-Smtp-Session: l3s3148p1@13QPR4rmzoUucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org Subject: [PATCH] parisc: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:00:55 +0200 Message-Id: <20220818210055.7181-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 --- drivers/parisc/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 1e4a5663d011..d4be9d2ee74d 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -646,7 +646,7 @@ int lcd_print( const char *str ) cancel_delayed_work_sync(&led_task); /* copy display string to buffer for procfs */ - strlcpy(lcd_text, str, sizeof(lcd_text)); + strscpy(lcd_text, str, sizeof(lcd_text)); /* Set LCD Cursor to 1st character */ gsc_writeb(lcd_info.reset_cmd1, LCD_CMD_REG); -- 2.35.1