]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Export xe_step_name for kunit tests
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 1 Jul 2025 20:13:23 +0000 (13:13 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 2 Jul 2025 23:08:54 +0000 (16:08 -0700)
xe_step_name() is used by xe_assert(), so adding assertions to functions
like xe_device_get_gt() will result in

  ERROR: modpost: "xe_step_name" [drivers/gpu/drm/xe/tests/xe_test.ko] undefined!

while building the kunit tests.  Export xe_step_name to avoid these
build failures when adding assertions.

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250701201320.2514369-11-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_step.c

index c77b5c317fa00c8f2fa027ed8911fe513ea621b4..10e88f2c9615ef881e2e1614d0b47bd7d833d43b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "xe_step.h"
 
+#include <kunit/visibility.h>
 #include <linux/bitfield.h>
 
 #include "xe_device.h"
@@ -255,3 +256,4 @@ const char *xe_step_name(enum xe_step step)
                return "**";
        }
 }
+EXPORT_SYMBOL_IF_KUNIT(xe_step_name);