public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] random: fix a compilation error on arm64
@ 2020-08-06 13:58 Qian Cai
  2020-08-06 14:50 ` Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Qian Cai @ 2020-08-06 13:58 UTC (permalink / raw)
  To: torvalds
  Cc: daniel.diaz, linux, tytso, catalin.marinas, will,
	linux-arm-kernel, linux-kernel, Qian Cai

linux-next failed to compile using this .config,
https://gitlab.com/cailca/linux-mm/-/blob/master/arm64.config

arch/arm64/kernel/kaslr.c: In function 'kaslr_early_init':
arch/arm64/kernel/kaslr.c:128:6: error: implicit declaration of function
'__early_cpu_has_rndr'; did you mean '__early_pfn_to_nid'?
[-Werror=implicit-function-declaration]
  if (__early_cpu_has_rndr()) {
      ^~~~~~~~~~~~~~~~~~~~
      __early_pfn_to_nid
arch/arm64/kernel/kaslr.c:131:7: error: implicit declaration of function
'__arm64_rndr' [-Werror=implicit-function-declaration]
   if (__arm64_rndr(&raw))
       ^~~~~~~~~~~~
cc1: some warnings being treated as errors

Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around")
Signed-off-by: Qian Cai <cai@lca.pw>
---
 include/linux/random.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/random.h b/include/linux/random.h
index f45b8be3e3c4..da782c16c20c 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -12,6 +12,8 @@
 #include <linux/list.h>
 #include <linux/once.h>
 
+#include <asm/archrandom.h>
+
 #include <uapi/linux/random.h>
 
 struct random_ready_callback {
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-07  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 13:58 [PATCH] random: fix a compilation error on arm64 Qian Cai
2020-08-06 14:50 ` Guenter Roeck
2020-08-06 22:43   ` Qian Cai
2020-08-07  0:19     ` Guenter Roeck
2020-08-06 22:01 ` kernel test robot
2020-08-06 22:25 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox