Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2080689iob; Fri, 20 May 2022 01:11:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc4V/xWox9Gjl6jT4oW2w/4Pd9nq7C1EtWFDBEujvVLYL7SLjifnuIRv7IRZOehE1/eeYT X-Received: by 2002:a63:6a45:0:b0:3c1:47b7:edce with SMTP id f66-20020a636a45000000b003c147b7edcemr7366023pgc.207.1653034292311; Fri, 20 May 2022 01:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653034292; cv=none; d=google.com; s=arc-20160816; b=eRr6Y1iKKu+MCHgqll3RJUPs7NkpTbYLvypyb6DfOfj7+D6eJxD24QX7Wmd09ZmUWp mjWCLFPSHaOKRu2ecbLLfb7iel3ab3nHK7Q/e7BJwA1A5b5rMjtOYpL2uhc1JRmboGmJ ZPa1mjp6h6WPhN8fUxaAbamn4Jl0HFL/xfbZly1fOHSN9bNs+scjSwjDD37WfMIfP62A 67c3bxiAKLR+GeQ5kVPJ116uUv3ms/AEpb9AcWd2wOJrVvlTjy1jnySgUEJKpNJ7Ctyk pCCBwy0FMNfL7ipz/Ubty0JtYsqfjkXjiEn2T8w67r/AAw+8NdgdC18YPA0QkbaPMR7x QrOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=eS/h0tWntx7/+CLf9SOTFpNKe9Pk4Uw5KksBhq2jqyc=; b=r8I6egd2JfOFmaC7gbvrgHp/YCXhx+ltILnd2cFAFTYCRhKsRijT9tb2FKUEiXiTR/ slrcPgzNpk9jfNhafSDACYMLUndycutmbGxCKaoRRqAuz6Bt7/4xHycWbeYQyJoskeOo lUBqgOie7l8xM8Bho3CprEOBHUuIuM0L2cnXMOdfAryImm5WTNCKP1WlftPX4o0Ymepn TBmPWtDlkVYvhSwJNEPRreGySbOYwKlG+0rgoK8SWcuWCci/DLGir3Oq0zuXRwrK+0IW H6m/96Kdaz0KGdflMvgr8z40FuE2s8qdDk71p3CzR/BL0CScoLdLWqq9jOPnWNSqz6fX UH0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mSMnHB2L; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a170902f60300b0015415173078si10672253plg.220.2022.05.20.01.11.09; Fri, 20 May 2022 01:11:32 -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=@kernel.org header.s=k20201202 header.b=mSMnHB2L; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245383AbiESWN0 (ORCPT + 99 others); Thu, 19 May 2022 18:13:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237755AbiESWNZ (ORCPT ); Thu, 19 May 2022 18:13:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F01E5AEDD; Thu, 19 May 2022 15:13:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0E567B828AA; Thu, 19 May 2022 22:13:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CCD3C385AA; Thu, 19 May 2022 22:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652998401; bh=EhDdM7epHX9M88QHEaZ6KEcngcsL6EzezvL86BA/qvk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=mSMnHB2LYlct4HqsAGisrXJrlzO/233uMmDVPNlG5O41+0Pq3B6Fg7pwj2pBs4VFa F+AcqKhP0MnJJAfxhY/9K0QgN5QlR3v6Vdrxa7VUsTgfpOovPy6N001uHdZ7dnyYNW +laAig2cWGmmSHlni2WZIB4FdVX2IyC2uE8rZC0R8L37KxTtuRrKpYpTLRBRiEehen 3fYS9URY461hYeY0L+ewR4ZOxhz/3Id0RXNOHW7w94KuQ4TfWR+QmDQaKz/GguS8A8 XskhX9wx5VR9JS9Xtd/5XiPtkU0nRjrFGIhQxzJX4U+xbn00+lSihsEJz8FGJhPUyr GNVs/Cc4hXNEA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220519073330.7187-1-krzysztof.kozlowski@linaro.org> References: <20220519073330.7187-1-krzysztof.kozlowski@linaro.org> Subject: Re: [PATCH v2 1/3] rpmsg: qcom: glink: replace strncpy() with strscpy_pad() From: Stephen Boyd Cc: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Mathieu Poirier , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Date: Thu, 19 May 2022 15:13:19 -0700 User-Agent: alot/0.10 Message-Id: <20220519221321.9CCD3C385AA@smtp.kernel.org> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Quoting Krzysztof Kozlowski (2022-05-19 00:33:28) > The use of strncpy() is considered deprecated for NUL-terminated > strings[1]. Replace strncpy() with strscpy_pad(), to keep existing > pad-behavior of strncpy, similarly to commit 08de420a8014 ("rpmsg: > glink: Replace strncpy() with strscpy_pad()"). This fixes W=3D1 warning: >=20 > In function =E2=80=98qcom_glink_rx_close=E2=80=99, > inlined from =E2=80=98qcom_glink_work=E2=80=99 at ../drivers/rpmsg/qc= om_glink_native.c:1638:4: > drivers/rpmsg/qcom_glink_native.c:1549:17: warning: =E2=80=98strncpy=E2= =80=99 specified bound 32 equals destination size [-Wstringop-truncation] > 1549 | strncpy(chinfo.name, channel->name, sizeof(chin= fo.name)); >=20 > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncp= y-on-nul-terminated-strings >=20 > Signed-off-by: Krzysztof Kozlowski >=20 > --- Reviewed-by: Stephen Boyd