drm/i915: Fix header test for !CONFIG_X86
authorLucas De Marchi <lucas.demarchi@intel.com>
Mon, 31 Jan 2022 16:59:25 +0000 (08:59 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 3 Feb 2022 09:06:56 +0000 (01:06 -0800)
commit377c675f3c17ffaefd023ee283bb366bbd6bbcea
treeca559b79e6ecadade9c0370948b7eb7fa868f15a
parentd30b9ae93bf57414160503d3cc62735adeb61557
drm/i915: Fix header test for !CONFIG_X86

Architectures others than x86 have a stub implementation calling
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:26:2: error: implicit declaration of function ‘WARN_ON_ONCE’ [-Werror=implicit-function-declaration]
   26 |  WARN_ON_ONCE(1);
      |  ^~~~~~~~~~~~

v2: Do not include <linux/printk.h> since call to pr_err() has been
removed

Fixes: 67c430bbaae1 ("drm/i915: Skip remap_io_mapping() for non-x86 platforms")
Cc: Siva Mullati <siva.mullati@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Siva Mullati <siva.mullati@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220131165926.3230642-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/i915_mm.h