Re: [PATCH] crypto: bcm - Drop unused setting of local 'ptr' variable

From: Herbert Xu
Date: Mon Jan 13 2025 - 22:46:09 EST


On Sat, Jan 04, 2025 at 09:55:02PM +0100, Krzysztof Kozlowski wrote:
> spum_cipher_req_init() assigns 'spu_hdr' to local 'ptr' variable and
> later increments 'ptr' over specific fields like it was meant to point
> to pieces of message for some purpose. However the code does not read
> 'ptr' at all thus this entire iteration over 'spu_hdr' seams pointless.
>
> Reported by clang W=1 build:
>
> drivers/crypto/bcm/spu.c:839:6: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> ---
> drivers/crypto/bcm/spu.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt