Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5893769rwd; Wed, 24 May 2023 08:08:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6o3IB7lLHdGTPT9QqVcEgDJN/mGAILPOyXWe/aApRB36y6dWBkZGyi+G6sDwTMVVfD6T9V X-Received: by 2002:a17:902:da8a:b0:1af:df8e:d534 with SMTP id j10-20020a170902da8a00b001afdf8ed534mr2697357plx.27.1684940909305; Wed, 24 May 2023 08:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684940909; cv=none; d=google.com; s=arc-20160816; b=Ql3GaFyrqD/3tJyh4r+DN0jrHL6M4Khzm3gqtGVFfIXUFzj8PBoOFzhqtkNa2VwUGD 50niAjIwylCy7w+fqdqNIT1Lc400XbfMJ4Z7NZAUy9E6j5ACd4Hj6DBIDhNN+DanGeG3 2TopaUxuyJKN17p5d6pwJo9jcVY/NSCSz5CqS6VLQ7vMOhNTOasTxRTP5WafuyU5pfCs JqHt4jfgKw0ukcpadj4QGgywWEP4ynR11NhKvfR/K6TdPGVUe1E+o3txL/kdCb4EzMTT CzdWRQ7svGJK1brhmuSSZuBzEln319PnfHQrBZR/K+PPAXwGMZlhtj9ejFH+5nztaS06 ITNQ== 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=fXem3yKXOihJJdx17tUBQkjwgvhxr2WQLiz8jXaVkhE=; b=Ws+L9Nx9zERgP4bK8Ov1Q0TLG6UdaI8iD8U5rgIh9G3wqcwPGR2MNlqNNN6arpqAId 2ojC0J1gacR4raVdqvtrad0aw6okoO3JdijJek9CVJDfSLUUzVd3oF+rKSX6Aj8k8b8n TNUjZjPKsDBSh8qEcC3LReLzyVDcp+E1vU+B46zTCFbkmxNpFOKVXabO5RarJGUlkK8v rWTibmIrR+t0BMgIjdGUEmNt5VO2E+nkjETfmgwhMAWoCxxZFlJuKWHI2MVLQRrwKY7M Mg2+kPh9FkVoJ9a7EkG3a3tcKIs6PU7ekX2A0bBHRgX/ON7cTP7GXXIPCx3k+uudGljm M4+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=FlMIwTim; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js19-20020a17090b149300b0024e1138cd9dsi1539929pjb.157.2023.05.24.08.08.16; Wed, 24 May 2023 08:08:29 -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=pass header.i=@gmail.com header.s=20221208 header.b=FlMIwTim; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235533AbjEXOsc (ORCPT + 99 others); Wed, 24 May 2023 10:48:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbjEXOsa (ORCPT ); Wed, 24 May 2023 10:48:30 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20987130; Wed, 24 May 2023 07:48:28 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-76c5558ba95so32047939f.1; Wed, 24 May 2023 07:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684939707; x=1687531707; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fXem3yKXOihJJdx17tUBQkjwgvhxr2WQLiz8jXaVkhE=; b=FlMIwTim4LKgFxNH+zhsenhJP4RenIiD00DuPobzZ27zTWHuvDDRdkoGECsDn4pA96 rkU1L103lIgwpF6y43ixGXnqBUUuIprszE9K+CKXdIQWIfRVutaWNL1MgscqT4Ebumsl W6rPW03pey7/xLqD9DxGYOy3tLc3ChnBm19L48mzT9aIrJCrW/VYL1W8LfRH6uPXwCZQ luv2DwDSGJYi1JKn6Wzwpyn3tYFfjYdJ/t8VSBqCEvO3w1hNuHMBNPswH0ieG9a2JQRi TUfrb6eUmrdziGVOnlIYXB/7chtRC7Pq/4K7+JFXFInkLgax0x2fJhoKmNmKdeOWzmul Q6Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684939707; x=1687531707; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fXem3yKXOihJJdx17tUBQkjwgvhxr2WQLiz8jXaVkhE=; b=PHOwvtng37BpTMehbTyD9v6LROvhyMrECkASOhcFmCnh6E+PSpi14I4yN6GcrHHyfL PVnEvAnzWiVEWNKqsPNiL9wTywuJvtf5FfSg5ZTYSEx29o3twTKo5z7xg+4/M1BixmC3 Blkmb7vDESnvMr6bizqXEjOV2KimEKmmZ14YHw9jMpngxyv3HedtlLYjMn4mJg9f6qBf IQkDMa5tyu35y6fZ41wXtVgmWDmL4/jUXkLklVExb03YKnuHwmPh4maDq3OLVy/vsUXn 6GMAYWoL53RcW4hIMgSIbBWArEIDRi67jDT1qkAWV7/ySisCwPQ5TLVmL7VhEAVXOjOE K3yA== X-Gm-Message-State: AC+VfDwfA+V1UKosug2zPInDGyDKvPs77g9ZBeEdqmdqkXypQmgJh2cb inTxAMo13mQ5bSoDYu1IS0m0U6e4yYRAZA== X-Received: by 2002:a6b:750c:0:b0:760:ed78:a252 with SMTP id l12-20020a6b750c000000b00760ed78a252mr11717592ioh.9.1684939707197; Wed, 24 May 2023 07:48:27 -0700 (PDT) Received: from azeems-kspp.c.googlers.com.com (54.70.188.35.bc.googleusercontent.com. [35.188.70.54]) by smtp.gmail.com with ESMTPSA id r22-20020a6bd916000000b0076efc7f0dd4sm3398910ioc.42.2023.05.24.07.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 07:48:26 -0700 (PDT) From: Azeem Shaikh To: Sakari Ailus Cc: linux-hardening@vger.kernel.org, Azeem Shaikh , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Machek , Lee Jones Subject: [PATCH v2] leds: as3645a: Replace strlcpy with strscpy Date: Wed, 24 May 2023 14:48:23 +0000 Message-ID: <20230524144824.2360607-1-azeemshaikh38@gmail.com> X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace it with strscpy()[2]. No return values were used, so direct replacement is safe. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh --- v1: https://lore.kernel.org/all/20230523021150.2406032-1-azeemshaikh38@gmail.com/ Changes in v2: - Updated subject and commit log. drivers/leds/flash/leds-as3645a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/leds/flash/leds-as3645a.c b/drivers/leds/flash/leds-as3645a.c index bb2249771acb..7dc574b18f5f 100644 --- a/drivers/leds/flash/leds-as3645a.c +++ b/drivers/leds/flash/leds-as3645a.c @@ -651,8 +651,8 @@ static int as3645a_v4l2_setup(struct as3645a *flash) }, }; - strlcpy(cfg.dev_name, led->dev->kobj.name, sizeof(cfg.dev_name)); - strlcpy(cfgind.dev_name, flash->iled_cdev.dev->kobj.name, + strscpy(cfg.dev_name, led->dev->kobj.name, sizeof(cfg.dev_name)); + strscpy(cfgind.dev_name, flash->iled_cdev.dev->kobj.name, sizeof(cfgind.dev_name)); flash->vf = v4l2_flash_init( -- 2.40.1.698.g37aff9b760-goog