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

drm/xe/kunit: Allow to replace xe_guc_ct_send_recv() with stub

We want to use replacement functions in upcoming kunit tests.

Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20240104222031.277-9-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

+3
+3
drivers/gpu/drm/xe/xe_guc_ct.c
··· 9 9 #include <linux/circ_buf.h> 10 10 #include <linux/delay.h> 11 11 12 + #include <kunit/static_stub.h> 13 + 12 14 #include <drm/drm_managed.h> 13 15 14 16 #include "abi/guc_actions_abi.h" ··· 784 782 int xe_guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len, 785 783 u32 *response_buffer) 786 784 { 785 + KUNIT_STATIC_STUB_REDIRECT(xe_guc_ct_send_recv, ct, action, len, response_buffer); 787 786 return guc_ct_send_recv(ct, action, len, response_buffer, false); 788 787 } 789 788