The patch titled Subject: drm/msm: clean up fault injection usage has been added to the -mm mm-nonmm-unstable branch. Its filename is drm-msm-clean-up-fault-injection-usage.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/drm-msm-clean-up-fault-injection-usage.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Jani Nikula <jani.nikula@xxxxxxxxx> Subject: drm/msm: clean up fault injection usage Date: Tue, 13 Aug 2024 15:12:36 +0300 With the proper stubs in place in linux/fault-inject.h, we can remove a bunch of conditional compilation for CONFIG_FAULT_INJECTION=n. Link: https://lkml.kernel.org/r/20240813121237.2382534-2-jani.nikula@xxxxxxxxx Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> Reviewed-by: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@xxxxxxxxx> Cc: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Rob Clark <robdclark@xxxxxxxxx> Cc: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/msm/msm_debugfs.c | 2 -- drivers/gpu/drm/msm/msm_drv.c | 2 -- drivers/gpu/drm/msm/msm_drv.h | 4 ---- 3 files changed, 8 deletions(-) --- a/drivers/gpu/drm/msm/msm_debugfs.c~drm-msm-clean-up-fault-injection-usage +++ a/drivers/gpu/drm/msm/msm_debugfs.c @@ -357,12 +357,10 @@ void msm_debugfs_init(struct drm_minor * if (priv->kms && priv->kms->funcs->debugfs_init) priv->kms->funcs->debugfs_init(priv->kms, minor); -#ifdef CONFIG_FAULT_INJECTION fault_create_debugfs_attr("fail_gem_alloc", minor->debugfs_root, &fail_gem_alloc); fault_create_debugfs_attr("fail_gem_iova", minor->debugfs_root, &fail_gem_iova); -#endif } #endif --- a/drivers/gpu/drm/msm/msm_drv.c~drm-msm-clean-up-fault-injection-usage +++ a/drivers/gpu/drm/msm/msm_drv.c @@ -58,10 +58,8 @@ static bool modeset = true; MODULE_PARM_DESC(modeset, "Use kernel modesetting [KMS] (1=on (default), 0=disable)"); module_param(modeset, bool, 0600); -#ifdef CONFIG_FAULT_INJECTION DECLARE_FAULT_ATTR(fail_gem_alloc); DECLARE_FAULT_ATTR(fail_gem_iova); -#endif static int msm_drm_uninit(struct device *dev) { --- a/drivers/gpu/drm/msm/msm_drv.h~drm-msm-clean-up-fault-injection-usage +++ a/drivers/gpu/drm/msm/msm_drv.h @@ -33,12 +33,8 @@ #include <drm/msm_drm.h> #include <drm/drm_gem.h> -#ifdef CONFIG_FAULT_INJECTION extern struct fault_attr fail_gem_alloc; extern struct fault_attr fail_gem_iova; -#else -# define should_fail(attr, size) 0 -#endif struct msm_kms; struct msm_gpu; _ Patches currently in -mm which might be from jani.nikula@xxxxxxxxx are fault-inject-improve-build-for-config_fault_injection=n.patch drm-msm-clean-up-fault-injection-usage.patch drm-xe-clean-up-fault-injection-usage.patch