✗ CI.checkpatch: warning for drm/xe/vm: Subclass userptr vmas
Patchwork
patchwork at emeril.freedesktop.org
Tue Jan 30 17:05:32 UTC 2024
== Series Details ==
Series: drm/xe/vm: Subclass userptr vmas
URL : https://patchwork.freedesktop.org/series/129324/
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
35591fb8b4d5305b37ce31483f85ac0956eaa536
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 5e57ba301504806e1d69f3fa1f2196738bc99aad
Author: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Date: Tue Jan 30 18:02:07 2024 +0100
drm/xe/vm: Subclass userptr vmas
The construct allocating only parts of the vma structure when
the userptr part is not needed is very fragile. A developer could
add additional fields below the userptr part, and the code could
easily attempt to access the userptr part even if its not persent.
So introduce xe_userptr_vma which subclasses struct xe_vma the
proper way, and accordingly modify a couple of interfaces.
This should also help if adding userptr helpers to drm_gpuvm.
Fixes: a4cc60a55fd9 ("drm/xe: Only alloc userptr part of xe_vma for userptrs")
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
+ /mt/dim checkpatch 9f34133aed7be8704656caab78225635ff43bf09 drm-intel
5e57ba301 drm/xe/vm: Subclass userptr vmas
-:18: WARNING:UNKNOWN_COMMIT_ID: Unknown commit id 'a4cc60a55fd9', maybe rebased or not pulled?
#18:
Fixes: a4cc60a55fd9 ("drm/xe: Only alloc userptr part of xe_vma for userptrs")
-:364: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*vma)...) over kzalloc(sizeof(struct xe_userptr_vma)...)
#364: FILE: drivers/gpu/drm/xe/xe_vm.c:809:
+ vma = kzalloc(sizeof(struct xe_userptr_vma), GFP_KERNEL);
total: 0 errors, 1 warnings, 1 checks, 478 lines checked
More information about the Intel-xe
mailing list