[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220519001214.A7DE2C385A5@smtp.kernel.org>
Date: Wed, 18 May 2022 17:12:12 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-remoteproc@...r.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: Re: [PATCH 7/8] soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
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=1 warning:
>
> drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_get_header.part.0’:
> drivers/soc/qcom/cmd-db.c:151:9: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
> 151 | strncpy(query, id, sizeof(query));
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
Reviewed-by: Stephen Boyd <sboyd@...nel.org>
Powered by blists - more mailing lists