From: Hadar Gat <Hadar.Gat@arm.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Matt Mackall <mpm@selenic.com>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Gilad Ben-Yossef <gilad@benyossef.com>,
Ofir Drang <Ofir.Drang@arm.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
nd <nd@arm.com>
Subject: RE: hwrng: cctrng - Remove unnecessary FIPS ifdef
Date: Mon, 20 Apr 2020 08:36:01 +0000 [thread overview]
Message-ID: <DB6PR0802MB2533B88B20AC4BDEF5955818E9D40@DB6PR0802MB2533.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20200420082819.GA23022@gondor.apana.org.au>
> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: Monday, 20 April 2020 11:28
> To: Hadar Gat <Hadar.Gat@arm.com>
> Cc: Matt Mackall <mpm@selenic.com>; Arnd Bergmann <arnd@arndb.de>;
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Gilad Ben-Yossef
> <gilad@benyossef.com>; Ofir Drang <Ofir.Drang@arm.com>; linux-
> crypto@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: hwrng: cctrng - Remove unnecessary FIPS ifdef
>
> This patch removes the unnecessary FIPS ifdef in cctrng.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
Acked-by: Hadar Gat <hadar.gat@arm.com>
> diff --git a/drivers/char/hw_random/cctrng.c
> b/drivers/char/hw_random/cctrng.c index e82716c12c3a..49fb65a221f3
> 100644
> --- a/drivers/char/hw_random/cctrng.c
> +++ b/drivers/char/hw_random/cctrng.c
> @@ -331,13 +331,11 @@ void cc_trng_compwork_handler(struct
> work_struct *w)
> ehr_valid = CC_REG_FLD_GET(RNG_ISR, EHR_VALID, isr);
> dev_dbg(dev, "Got RNG_ISR=0x%08X (EHR_VALID=%u)\n", isr,
> ehr_valid);
>
> -#ifdef CONFIG_CRYPTO_FIPS
> - if (CC_REG_FLD_GET(RNG_ISR, CRNGT_ERR, isr) && fips_enabled) {
> + if (fips_enabled && CC_REG_FLD_GET(RNG_ISR, CRNGT_ERR, isr)) {
> fips_fail_notify();
> /* FIPS error is fatal */
> panic("Got HW CRNGT error while fips is enabled!\n");
> }
> -#endif
>
> /* Clear all pending RNG interrupts */
> cc_iowrite(drvdata, CC_RNG_ICR_REG_OFFSET, isr);
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page:
> http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2020-04-20 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 20:38 [PATCH] hwrng: cctrng - add missing include to linux/fips.h Hadar Gat
2020-04-17 21:34 ` Randy Dunlap
2020-04-20 8:22 ` Herbert Xu
2020-04-20 8:28 ` hwrng: cctrng - Remove unnecessary FIPS ifdef Herbert Xu
2020-04-20 8:36 ` Hadar Gat [this message]
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=DB6PR0802MB2533B88B20AC4BDEF5955818E9D40@DB6PR0802MB2533.eurprd08.prod.outlook.com \
--to=hadar.gat@arm.com \
--cc=Ofir.Drang@arm.com \
--cc=arnd@arndb.de \
--cc=gilad@benyossef.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=nd@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).