[Intel-gfx] [PATCH] drm/i915: Fix header test for !CONFIG_X86
Lucas De Marchi
lucas.demarchi at intel.com
Tue Jan 25 18:31:42 UTC 2022
Architectures other than x86 have a stub implementation calling
pr_err() and WARN_ON_ONCE(). The appropriate headers need to be
included, otherwise the header-test target will fail with:
HDRTEST drivers/gpu/drm/i915/i915_mm.h
In file included from <command-line>:
./drivers/gpu/drm/i915/i915_mm.h: In function ‘remap_io_mapping’:
./drivers/gpu/drm/i915/i915_mm.h:25:2: error: implicit declaration of function ‘pr_err’ [-Werror=implicit-function-declaration]
25 | pr_err("Architecture has no %s() and shouldn't be calling this function\n", __func__);
| ^~~~~~
HDRTEST drivers/gpu/drm/i915/i915_trace.h
./drivers/gpu/drm/i915/i915_mm.h:26:2: error: implicit declaration of function ‘WARN_ON_ONCE’ [-Werror=implicit-function-declaration]
26 | WARN_ON_ONCE(1);
| ^~~~~~~~~~~~
Fixes: 67c430bbaae1 ("drm/i915: Skip remap_io_mapping() for non-x86 platforms")
Cc: Siva Mullati <siva.mullati at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
drivers/gpu/drm/i915/i915_mm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_mm.h b/drivers/gpu/drm/i915/i915_mm.h
index 76f1d53bdf34..ea19c8d60168 100644
--- a/drivers/gpu/drm/i915/i915_mm.h
+++ b/drivers/gpu/drm/i915/i915_mm.h
@@ -6,6 +6,8 @@
#ifndef __I915_MM_H__
#define __I915_MM_H__
+#include <linux/bug.h>
+#include <linux/printk.h>
#include <linux/types.h>
struct vm_area_struct;
--
2.34.1
More information about the Intel-gfx
mailing list