Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: fix build with missing debugfs includes

/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:213:9: error: call to undeclared function 'debugfs_create_file_unsafe'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return debugfs_create_file_unsafe(name, mode, parent, value,
^
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:213:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct dentry *' [-Wint-conversion]
return debugfs_create_file_unsafe(name, mode, parent, value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:222:9: error: call to undeclared function 'debugfs_create_file_unsafe'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
return debugfs_create_file_unsafe(name, mode, parent, value,
^
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:222:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct dentry *' [-Wint-conversion]
return debugfs_create_file_unsafe(name, mode, parent, value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Building with clang gave me a bunch of similiar fails to the above.

Fixes: 33d5ae6cacf4 ("drm/print: drop include debugfs.h and include where needed")
Signed-off-by: Dave Airlie <airlied@redhat.com>

+3
+1
drivers/gpu/drm/i915/i915_debugfs.c
··· 30 30 #include <linux/sort.h> 31 31 #include <linux/string_helpers.h> 32 32 33 + #include <linux/debugfs.h> 33 34 #include <drm/drm_debugfs.h> 34 35 35 36 #include "display/intel_display_params.h"
+1
drivers/gpu/drm/i915/i915_debugfs_params.c
··· 4 4 */ 5 5 6 6 #include <linux/kernel.h> 7 + #include <linux/debugfs.h> 7 8 8 9 #include "i915_debugfs_params.h" 9 10 #include "gt/intel_gt.h"
+1
drivers/gpu/drm/i915/i915_gpu_error.c
··· 28 28 */ 29 29 30 30 #include <linux/ascii85.h> 31 + #include <linux/debugfs.h> 31 32 #include <linux/highmem.h> 32 33 #include <linux/nmi.h> 33 34 #include <linux/pagevec.h>