[PATCH 4/6] crypto: sun8i-ce-hash - drop CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG ifdefs

Herbert Xu herbert at gondor.apana.org.au
Sun Apr 6 20:56:36 PDT 2025


On Tue, Apr 01, 2025 at 10:23:19PM +0300, Ovidiu Panait wrote:
> 'struct sun8i_ce_alg_template' is always defined, even with
> CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG disabled, so the ifdef guards
> are not needed.
> 
> Make sure the statistics have IS_ENABLED() checks instead.
> 
> Signed-off-by: Ovidiu Panait <ovidiu.panait.oss at gmail.com>
> ---
>  drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
> index b0959d8218cb..530c5181d73c 100644
> --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
> +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
> @@ -31,9 +31,7 @@ static void sun8i_ce_hash_stat_fb_inc(struct crypto_ahash *tfm)
>  
>  		algt = container_of(alg, struct sun8i_ce_alg_template,
>  				    alg.hash.base);
> -#ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
>  		algt->stat_fb++;
> -#endif

Should this go under IS_ENABLED as well?

Thanks,
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the linux-arm-kernel mailing list