Re: [PATCH] crypto: tegra - Fix format specifier in tegra_sha_prep_cmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 13, 2025 at 04:29:31PM +0100, Nathan Chancellor wrote:
> When building for 32-bit targets, for which ssize_t is 'int' instead of
> 'long', there is a warning due to an incorrect format specifier:
> 
>   In file included from include/linux/printk.h:610,
>                    from include/linux/kernel.h:31,
>                    from include/linux/clk.h:13,
>                    from drivers/crypto/tegra/tegra-se-hash.c:7:
>   drivers/crypto/tegra/tegra-se-hash.c: In function 'tegra_sha_prep_cmd':
>   drivers/crypto/tegra/tegra-se-hash.c:343:26: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'ssize_t' {aka 'int'} [-Werror=format=]
>     343 |         dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x",
>         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   ...
>   drivers/crypto/tegra/tegra-se-hash.c:343:59: note: format string is defined here
>     343 |         dev_dbg(se->dev, "msg len %llu msg left %llu sz %lu cfg %#x",
>         |                                                         ~~^
>         |                                                           |
>         |                                                           long unsigned int
>         |                                                         %u
>   cc1: all warnings being treated as errors
> 
> Use '%zd', the proper specifier for ssize_t, to resolve the warning.
> 
> Fixes: ff4b7df0b511 ("crypto: tegra - Fix HASH intermediate result handling")
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> ---
>  drivers/crypto/tegra/tegra-se-hash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux