Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1000214iob; Wed, 18 May 2022 18:52:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJb+x52I15qcpZakgO2C24KTes4kRaf+viKT7sZdJmrII/UBObki7ywXPtaFcRHlxMV8S1 X-Received: by 2002:a17:902:c946:b0:15e:9c09:715a with SMTP id i6-20020a170902c94600b0015e9c09715amr2272873pla.168.1652925154001; Wed, 18 May 2022 18:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652925153; cv=none; d=google.com; s=arc-20160816; b=fOHYGNb23nE8hWjRPj9hxKe4ceFmBhxvNDP2cSyO3GNcRxmaT5ZGyqHS8QvbwQWi/e H7YCKHdadUdOcOkKpRKzd2RtD4Ol/Jamb/ZfS5YMx8FSGRzWPRiIXxKoN2mYJwgADO0O yq8fqIrUF2yyopB5eRv2J83A3Sfg8qWxiB/B6AA4fLOAQIaBlBwg7jcSP7p4oL1uRESF zC9wRpP2hdXRYEOp1aYVQPx+leRmBnAjy/YetGixDkBwlev0wbstuFyO/Wozenp8BBMr uQRYJXG3qHyVuhhVOBSkkzfGxSZhm9jOkPcLVkD4YMdRhOAw7a223J+iKDh12wlB6nu1 ywlg== 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=XK22+2IaGPPc9yiGokWXBZn6OOZizdTmzXmkkWM2k/k=; b=YmGbk4lTIvOR6M4nw6DMj+SmLK2djd/Ow/PtLDQKrb0omk83PNdyGiO7Eb3XpDSvLI AjUl9RKGkEIwWMxwWlL0CDh9DMLmkQP8Wj7L9+aBxns4GeAV38EY5rXkmJXOFa/OI+GT M4jTdwr+GNjLKS8C+/DXAMy18GtcwOMBLvu0DgsNJ0TelF/JWMt9PudRaHhxZ0MLKHB0 ntZpSGIcbtWjMa7ckDhqG2A0X4DyeEEmrH7KvmSo6SoMg2cmdQEAjVp8Bj2/cJckobZW mDHEYt9lWW/za0n7ldssPDMjrAeN+3OVCs4VTDgC9CenWeawDwzs8l2v8fY1YazygkU3 48iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b7cXZlT7; 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 u9-20020a170902e80900b00161946cd26esi5534465plg.476.2022.05.18.18.52.23; Wed, 18 May 2022 18:52:33 -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=b7cXZlT7; 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 S231976AbiESAM0 (ORCPT + 99 others); Wed, 18 May 2022 20:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231875AbiESAMU (ORCPT ); Wed, 18 May 2022 20:12:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 632996D955; Wed, 18 May 2022 17:12:17 -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 15B1FB82263; Thu, 19 May 2022 00:12:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7DE2C385A5; Thu, 19 May 2022 00:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652919134; bh=YDonGCHz2c+T5mdFPQ0Na/FKLrC5TiZsJnHeIvaUg7c=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=b7cXZlT7jJ73TVPd5iuVJbNqA3pJPJ+T27LwVPR2VrTy+ghSw2Cu9fcTXTA/IO0yS 6KF096UxBPQvhakGzmoeBKZOFwfj0BO/Y9TbBPBKqVRJDbyUKjPzQoUBc2I+9HaR8W P64zHBKEy2LRjDRFNHeqGh3ocfpmp7fQ7V5CdYzt/jWllHVvpjnPYZZpFO3bTRdZuH It8kPJAER3XyhjRpYyVBbauRuoNcAqSIOGjCkmEZ8sznRyU058kEQ7iP292RjOziRS qdYXL1xf10ICyX9Tpan5s/q2pjwSoNPLkAbTzrvKzs/bkpFuJfrg9VastowMk5DNGh kT5haG4vQsFzw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220501103520.111561-7-krzysztof.kozlowski@linaro.org> References: <20220501103520.111561-1-krzysztof.kozlowski@linaro.org> <20220501103520.111561-7-krzysztof.kozlowski@linaro.org> Subject: Re: [PATCH 7/8] soc: qcom: cmd-db: replace strncpy() with strscpy_pad() From: Stephen Boyd Cc: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Mathieu Poirier , Michael Turquette , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Date: Wed, 18 May 2022 17:12:12 -0700 User-Agent: alot/0.10 Message-Id: <20220519001214.A7DE2C385A5@smtp.kernel.org> X-Spam-Status: No, score=-7.4 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-01 03:35:19) > The use of strncpy() is considered deprecated for NUL-terminated > strings[1]. Replace strncpy() with strscpy_pad(), to keep existing > pad-behavior of strncpy. This fixes W=3D1 warning: >=20 > drivers/soc/qcom/cmd-db.c: In function =E2=80=98cmd_db_get_header.part.= 0=E2=80=99: > drivers/soc/qcom/cmd-db.c:151:9: warning: =E2=80=98strncpy=E2=80=99 spe= cified bound 8 equals destination size [-Wstringop-truncation] > 151 | strncpy(query, id, sizeof(query)); >=20 > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncp= y-on-nul-terminated-strings >=20 > Signed-off-by: Krzysztof Kozlowski > --- Reviewed-by: Stephen Boyd