Linux cryptographic layer development
 help / color / mirror / Atom feed
From: jagdsh.linux@gmail.com
To: hadar.gat@arm.com, mpm@selenic.com, herbert@gondor.apana.org.au,
	arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jagadeesh Pagadala <jagdsh.linux@gmail.com>
Subject: [PATCH] drivers/char/hw_random/cctrng.c: Compilation fix.
Date: Sun, 19 Apr 2020 15:21:18 +0530	[thread overview]
Message-ID: <1587289878-121900-1-git-send-email-jagdsh.linux@gmail.com> (raw)

From: Jagadeesh Pagadala <jagdsh.linux@gmail.com>

Adding the needed header <linux/fips.h> to fix following compilation error.

	CC      drivers/char/hw_random/cctrng.o
	drivers/char/hw_random/cctrng.c: In function ‘cc_trng_compwork_handler’:
	drivers/char/hw_random/cctrng.c:334:49: error: ‘fips_enabled’ undeclared (first use in this function)
	  if (CC_REG_FLD_GET(RNG_ISR, CRNGT_ERR, isr) && fips_enabled) {
							 ^
	drivers/char/hw_random/cctrng.c:334:49: note: each undeclared identifier is reported only once for each function it appears in
	drivers/char/hw_random/cctrng.c:335:3: error: implicit declaration of function ‘fips_fail_notify’ [-Werror=implicit-function-declaration]
	   fips_fail_notify();
	   ^
	cc1: some warnings being treated as errors
	make[4]: *** [drivers/char/hw_random/cctrng.o] Error 1

Signed-off-by: Jagadeesh Pagadala <jagdsh.linux@gmail.com>
---
 drivers/char/hw_random/cctrng.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index bdcd562..3124269 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -18,6 +18,10 @@
 
 #include "cctrng.h"
 
+#ifdef CONFIG_CRYPTO_FIPS
+#include <linux/fips.h>
+#endif
+
 #define CC_REG_LOW(name)  (name ## _BIT_SHIFT)
 #define CC_REG_HIGH(name) (CC_REG_LOW(name) + name ## _BIT_SIZE - 1)
 #define CC_GENMASK(name)  GENMASK(CC_REG_HIGH(name), CC_REG_LOW(name))
-- 
1.8.3.1


             reply	other threads:[~2020-04-19  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19  9:51 jagdsh.linux [this message]
2020-04-19 14:14 ` [PATCH] drivers/char/hw_random/cctrng.c: Compilation fix Hadar Gat

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=1587289878-121900-1-git-send-email-jagdsh.linux@gmail.com \
    --to=jagdsh.linux@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hadar.gat@arm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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