✗ CI.checkpatch: warning for MADVISE FOR XE (rev6)

Patchwork patchwork at emeril.freedesktop.org
Thu Aug 7 18:02:40 UTC 2025


== Series Details ==

Series: MADVISE FOR XE (rev6)
URL   : https://patchwork.freedesktop.org/series/149550/
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
c298eac5978c38dcc62a70c0d73c91765e7cc296
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit fa7a4dd3f3842dc526a0b907e528be5f91984aa1
Author: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
Date:   Thu Aug 7 22:13:38 2025 +0530

    drm/xe/uapi: Add UAPI for querying VMA count and memory attributes
    
    Introduce the DRM_IOCTL_XE_VM_QUERY_MEMORY_RANGE_ATTRS ioctl to allow
    userspace to query memory attributes of VMAs within a user specified
    virtual address range.
    
    Userspace first calls the ioctl with num_mem_ranges = 0,
    sizeof_mem_ranges_attr = 0 and vector_of_vma_mem_attr = NULL to retrieve
    the number of memory ranges (vmas) and size of each memory range attribute.
    Then, it allocates a buffer of that size and calls the ioctl again to fill
    the buffer with memory range attributes.
    
    This two-step interface allows userspace to first query the required
    buffer size, then retrieve detailed attributes efficiently.
    
    v2 (Matthew Brost)
    - Use same ioctl to overload functionality
    
    v3
    - Add kernel-doc
    
    v4
    - Make uapi future proof by passing struct size (Matthew Brost)
    - make lock interruptible (Matthew Brost)
    - set reserved bits to zero (Matthew Brost)
    - s/__copy_to_user/copy_to_user (Matthew Brost)
    - Avod using VMA term in uapi (Thomas)
    - xe_vm_put(vm) is missing (Shuicheng)
    
    v5
    - Nits
    - Fix kernel-doc
    
    Cc: Matthew Brost <matthew.brost at intel.com>
    Cc: Shuicheng Lin <shuicheng.lin at intel.com>
    Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
    Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
    Reviewed-by: Matthew Brost <matthew.brost at intel.com>
+ /mt/dim checkpatch 76741379fba333222be8a15bebf1e659eb84088a drm-intel
23eb1aea1421 drm/gpuvm: Pass map arguments through a struct
26e58a45c824 drm/gpuvm: Kill drm_gpuva_init()
47131ad3be2e drm/gpuvm: Support flags in drm_gpuvm_map_req
0b0b3fac1662 drm/gpuvm: Introduce DRM_GPUVM_SM_MAP_OPS_FLAG_SPLIT_MADVISE flag
b6838914e3a5 drm/xe/uapi: Add madvise interface
-:51: WARNING:LONG_LINE: line length of 113 exceeds 100 columns
#51: FILE: include/uapi/drm/xe_drm.h:122:
+#define DRM_IOCTL_XE_MADVISE			DRM_IOW(DRM_COMMAND_BASE + DRM_XE_MADVISE, struct drm_xe_madvise)

total: 0 errors, 1 warnings, 0 checks, 154 lines checked
3c8ee1f51c0a drm/xe/vm: Add attributes struct as member of vma
8b3317dc8c75 drm/xe/vma: Move pat_index to vma attributes
22743f774f84 drm/xe/vma: Modify new_vma to accept struct xe_vma_mem_attr as parameter
ecd2e1e04a42 drm/gpusvm: Make drm_gpusvm_for_each_* macros public
-:225: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'range__' - possible side-effects?
#225: FILE: include/drm/drm_gpusvm.h:452:
+#define drm_gpusvm_for_each_range_safe(range__, next__, notifier__, start__, end__)	\
+	for ((range__) = drm_gpusvm_range_find((notifier__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_range_next(range__);				\
+	     (range__) && (drm_gpusvm_range_start(range__) < (end__));			\
+	     (range__) = (next__), (next__) = __drm_gpusvm_range_next(range__))

-:225: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'next__' - possible side-effects?
#225: FILE: include/drm/drm_gpusvm.h:452:
+#define drm_gpusvm_for_each_range_safe(range__, next__, notifier__, start__, end__)	\
+	for ((range__) = drm_gpusvm_range_find((notifier__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_range_next(range__);				\
+	     (range__) && (drm_gpusvm_range_start(range__) < (end__));			\
+	     (range__) = (next__), (next__) = __drm_gpusvm_range_next(range__))

-:225: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'end__' - possible side-effects?
#225: FILE: include/drm/drm_gpusvm.h:452:
+#define drm_gpusvm_for_each_range_safe(range__, next__, notifier__, start__, end__)	\
+	for ((range__) = drm_gpusvm_range_find((notifier__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_range_next(range__);				\
+	     (range__) && (drm_gpusvm_range_start(range__) < (end__));			\
+	     (range__) = (next__), (next__) = __drm_gpusvm_range_next(range__))

-:258: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'notifier__' - possible side-effects?
#258: FILE: include/drm/drm_gpusvm.h:485:
+#define drm_gpusvm_for_each_notifier(notifier__, gpusvm__, start__, end__)		\
+	for ((notifier__) = drm_gpusvm_notifier_find((gpusvm__), (start__), (end__));	\
+	     (notifier__) && (drm_gpusvm_notifier_start(notifier__) < (end__));		\
+	     (notifier__) = __drm_gpusvm_notifier_next(notifier__))

-:258: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'end__' - possible side-effects?
#258: FILE: include/drm/drm_gpusvm.h:485:
+#define drm_gpusvm_for_each_notifier(notifier__, gpusvm__, start__, end__)		\
+	for ((notifier__) = drm_gpusvm_notifier_find((gpusvm__), (start__), (end__));	\
+	     (notifier__) && (drm_gpusvm_notifier_start(notifier__) < (end__));		\
+	     (notifier__) = __drm_gpusvm_notifier_next(notifier__))

-:274: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'notifier__' - possible side-effects?
#274: FILE: include/drm/drm_gpusvm.h:501:
+#define drm_gpusvm_for_each_notifier_safe(notifier__, next__, gpusvm__, start__, end__)	\
+	for ((notifier__) = drm_gpusvm_notifier_find((gpusvm__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_notifier_next(notifier__);				\
+	     (notifier__) && (drm_gpusvm_notifier_start(notifier__) < (end__));		\
+	     (notifier__) = (next__), (next__) = __drm_gpusvm_notifier_next(notifier__))

-:274: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'next__' - possible side-effects?
#274: FILE: include/drm/drm_gpusvm.h:501:
+#define drm_gpusvm_for_each_notifier_safe(notifier__, next__, gpusvm__, start__, end__)	\
+	for ((notifier__) = drm_gpusvm_notifier_find((gpusvm__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_notifier_next(notifier__);				\
+	     (notifier__) && (drm_gpusvm_notifier_start(notifier__) < (end__));		\
+	     (notifier__) = (next__), (next__) = __drm_gpusvm_notifier_next(notifier__))

-:274: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'end__' - possible side-effects?
#274: FILE: include/drm/drm_gpusvm.h:501:
+#define drm_gpusvm_for_each_notifier_safe(notifier__, next__, gpusvm__, start__, end__)	\
+	for ((notifier__) = drm_gpusvm_notifier_find((gpusvm__), (start__), (end__)),	\
+	     (next__) = __drm_gpusvm_notifier_next(notifier__);				\
+	     (notifier__) && (drm_gpusvm_notifier_start(notifier__) < (end__));		\
+	     (notifier__) = (next__), (next__) = __drm_gpusvm_notifier_next(notifier__))

total: 0 errors, 0 warnings, 8 checks, 248 lines checked
6696856c535c drm/xe/svm: Split system allocator vma incase of madvise call
5a268a8f7470 drm/xe: Allow CPU address mirror VMA unbind with gpu bindings for madvise
1ea78420534e drm/xe/svm: Add xe_svm_ranges_zap_ptes_in_range() for PTE zapping
e22fb48651bd drm/xe: Implement madvise ioctl for xe
-:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#53: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 330 lines checked
f175910a9e8f drm/xe/svm : Add svm ranges migration policy on atomic access
1892288b275e drm/xe/madvise: Update migration policy based on preferred location
5b342e844bb1 drm/xe/pat: Add helper for compression mode of pat index
1e6d3673d188 drm/xe/svm: Support DRM_XE_SVM_MEM_RANGE_ATTR_PAT memory attribute
d62924a44fc9 drm/xe/uapi: Add flag for consulting madvise hints on svm prefetch
ad08269caf59 drm/xe/svm: Consult madvise preferred location in prefetch
f52fbe553744 drm/xe/bo: Add attributes field to xe_bo
3965593c9e28 drm/xe/bo: Update atomic_access attribute on madvise
f47dd232d183 drm/xe/madvise: Skip vma invalidation if mem attr are unchanged
b3d3191df88c drm/xe/vm: Add helper to check for default VMA memory attributes
188affbc0731 drm/xe: Reset VMA attributes to default in SVM garbage collector
1b1fe7d76dea drm/xe: Enable madvise ioctl for xe
fa7a4dd3f384 drm/xe/uapi: Add UAPI for querying VMA count and memory attributes
-:210: WARNING:LONG_LINE: line length of 147 exceeds 100 columns
#210: FILE: include/uapi/drm/xe_drm.h:125:
+#define DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS	DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_QUERY_MEM_RANGE_ATTRS, struct drm_xe_vm_query_mem_range_attr)

total: 0 errors, 1 warnings, 0 checks, 287 lines checked




More information about the Intel-xe mailing list