]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: sun8i-ce-hash - drop CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG ifdefs
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Tue, 1 Apr 2025 19:23:19 +0000 (22:23 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 8 Apr 2025 07:54:38 +0000 (15:54 +0800)
'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@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c

index b0959d8218cb43ed6a69f6b32ee9ec989b9ce950..530c5181d73c0b2aad85a233d589948bf49cabb9 100644 (file)
@@ -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
        }
 }
 
@@ -354,9 +352,9 @@ int sun8i_ce_hash_run(struct crypto_engine *engine, void *breq)
        flow = rctx->flow;
        chan = &ce->chanlist[flow];
 
-#ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
-       algt->stat_req++;
-#endif
+       if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG))
+               algt->stat_req++;
+
        dev_dbg(ce->dev, "%s %s len=%d\n", __func__, crypto_tfm_alg_name(areq->base.tfm), areq->nbytes);
 
        cet = chan->tl;