From: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: clabbe.montjoie@gmail.com, davem@davemloft.net,
linux-crypto@vger.kernel.org, wens@csie.org,
jernej.skrabec@gmail.com, samuel@sholland.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] crypto: sun8i-ce-hash - drop CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG ifdefs
Date: Mon, 7 Apr 2025 09:26:17 +0300 [thread overview]
Message-ID: <115a9838-faf0-4607-87f9-c952b43bca78@gmail.com> (raw)
In-Reply-To: <Z_NM9LnUF6Gpv_iz@gondor.apana.org.au>
Hi,
On 4/7/25 6:56 AM, Herbert Xu wrote:
> 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@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?
>
This is already part of an IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)
block, so no need to add an extra IS_ENABLED() check here. Just the
ifdef was dropped:
if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)) {
struct sun8i_ce_alg_template *algt __maybe_unused;
struct ahash_alg *alg = crypto_ahash_alg(tfm);
algt = container_of(alg, struct sun8i_ce_alg_template,
alg.hash.base);
#ifdef CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG
algt->stat_fb++;
#endif
}
Thanks,
> Thanks,
next prev parent reply other threads:[~2025-04-07 6:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 19:23 [PATCH 1/6] crypto: sun8i-ce-hash - fix error handling in sun8i_ce_hash_run() Ovidiu Panait
2025-04-01 19:23 ` [PATCH 2/6] crypto: sun8i-ce-hash - remove duplicated fallback checks Ovidiu Panait
2025-04-01 19:23 ` [PATCH 3/6] crypto: sun8i-ce-hash - factor out debugfs fallback statistics Ovidiu Panait
2025-04-01 19:23 ` [PATCH 4/6] crypto: sun8i-ce-hash - drop CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG ifdefs Ovidiu Panait
2025-04-07 3:56 ` Herbert Xu
2025-04-07 6:26 ` Ovidiu Panait [this message]
2025-04-01 19:23 ` [PATCH 5/6] crypto: sun8i-ce-hash - add IS_ENABLED() checks to debugfs stats Ovidiu Panait
2025-04-01 19:23 ` [PATCH 6/6] crypto: sun8i-ce-hash - use API helpers to setup fallback request Ovidiu Panait
2025-04-08 8:11 ` [PATCH 1/6] crypto: sun8i-ce-hash - fix error handling in sun8i_ce_hash_run() Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=115a9838-faf0-4607-87f9-c952b43bca78@gmail.com \
--to=ovidiu.panait.oss@gmail.com \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®