summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-01-05 18:19:47 +0100
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-01-05 21:28:09 +0100
commit2b35ae108c7f5486adbc9e70377110ab8c91f61b (patch)
treee8f1ebdc9ba80c16f591cffe4dc6365fb27670d6 /drivers
parent0d68d06553ee9ad6d4ffc000599765211cad4930 (diff)
drm/xe: Fix compilation without CONFIG_KUNIT
It looks that declaration of kunit_get_current_test() was available in xe_guc_relay.c only with CONFIG_KUNIT enabled. If CONFIG_KUNIT is disabled we fail with: In file included from ../include/linux/build_bug.h:5, from ../include/linux/bitfield.h:10, from ../drivers/gpu/drm/xe/xe_guc_relay.c:6: ../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’: ../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration] 863 | if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test())) | ^~~~~~~~~~~~~~~~~~~~~~ ../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’ 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Fixes: 811fe9f556fc ("drm/xe/guc: Introduce Relay Communication for SR-IOV") Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Tested-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://lore.kernel.org/r/20240105171947.321-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/xe/xe_guc_relay.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
index b772088979bd..c0a2d8d5d3b3 100644
--- a/drivers/gpu/drm/xe/xe_guc_relay.c
+++ b/drivers/gpu/drm/xe/xe_guc_relay.c
@@ -9,6 +9,7 @@
#include <drm/drm_managed.h>
#include <kunit/static_stub.h>
+#include <kunit/test-bug.h>
#include "abi/guc_actions_sriov_abi.h"
#include "abi/guc_relay_actions_abi.h"