✗ CI.checkpatch: warning for drm/xe: Misc refine for svm
Patchwork
patchwork at emeril.freedesktop.org
Fri Jul 18 22:20:17 UTC 2025
== Series Details ==
Series: drm/xe: Misc refine for svm
URL : https://patchwork.freedesktop.org/series/151842/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
63535c743231a7497a612c53f6edbb8a7d14412d
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 49e2c2657f8a65705543bba543e6e1ddfc4ade6c
Author: Shuicheng Lin <shuicheng.lin at intel.com>
Date: Fri Jul 18 21:24:10 2025 +0000
drm/xe: Misc refine for svm
in function xe_svm_handle_pagefault(), migrate_try_count is set to 3 when
ctx.devmem_only is true. If ctx.devmem_only is false, the try count is 1,
which means no retry. Remove the "!ctx.devmem_only" check for the retry
path.
Below other changes should have no function effect.
1. Correct typo of "operation"in macro range_debug().
2. Combine 2 spin_lock() call in xe_svm_garbage_collector() into 1.
3. Remove preferred_region_is_vram check in xe_svm_range_needs_migrate_to_vram()
as it is already checked in the begin of this function.
4. Combine the devmem_possible check in xe_svm_handle_pagefault().
5. Combine 2 xe_vm_unlock() call in xe_svm_handle_pagefault() into 1.
Cc: Matthew Brost <matthew.brost at intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
+ /mt/dim checkpatch 17cc1a17481ab5481b6cd9f01eb073a254b7a3b2 drm-intel
49e2c2657f8a drm/xe: Misc refine for svm
-:14: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#14:
3. Remove preferred_region_is_vram check in xe_svm_range_needs_migrate_to_vram()
-:31: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#31: FILE: drivers/gpu/drm/xe/xe_svm.c:53:
+#define range_debug(r__, operation__) \
vm_dbg(&range_to_vm(&(r__)->base)->xe->drm, \
"%s: asid=%u, gpusvm=%p, vram=%d,%d, seqno=%lu, " \
"start=0x%014lx, end=0x%014lx, size=%lu", \
+ (operation__), range_to_vm(&(r__)->base)->usm.asid, \
(r__)->base.gpusvm, \
xe_svm_range_in_vram((r__)) ? 1 : 0, \
xe_svm_range_has_vram_binding((r__)) ? 1 : 0, \
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
-:31: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'r__' - possible side-effects?
#31: FILE: drivers/gpu/drm/xe/xe_svm.c:53:
+#define range_debug(r__, operation__) \
vm_dbg(&range_to_vm(&(r__)->base)->xe->drm, \
"%s: asid=%u, gpusvm=%p, vram=%d,%d, seqno=%lu, " \
"start=0x%014lx, end=0x%014lx, size=%lu", \
+ (operation__), range_to_vm(&(r__)->base)->usm.asid, \
(r__)->base.gpusvm, \
xe_svm_range_in_vram((r__)) ? 1 : 0, \
xe_svm_range_has_vram_binding((r__)) ? 1 : 0, \
total: 1 errors, 1 warnings, 1 checks, 104 lines checked
More information about the Intel-xe
mailing list