diff options
author | Arnd Bergmann <arnd@arndb.de> | 2024-02-12 12:22:17 +0100 |
---|---|---|
committer | Danilo Krummrich <dakr@redhat.com> | 2024-02-12 15:53:49 +0100 |
commit | 2c80a2b715df75881359d07dbaacff8ad411f40e (patch) | |
tree | 091fa11f16bab931088c93cb63d54b8f0b913c88 /sound | |
parent | a1d8700d906444167899e5a3c64a11ba50c0badd (diff) | |
download | linux-stable-2c80a2b715df75881359d07dbaacff8ad411f40e.tar.gz linux-stable-2c80a2b715df75881359d07dbaacff8ad411f40e.tar.bz2 linux-stable-2c80a2b715df75881359d07dbaacff8ad411f40e.zip |
nouveau/svm: fix kvcalloc() argument order
The conversion to kvcalloc() mixed up the object size and count
arguments, causing a warning:
drivers/gpu/drm/nouveau/nouveau_svm.c: In function 'nouveau_svm_fault_buffer_ctor':
drivers/gpu/drm/nouveau/nouveau_svm.c:1010:40: error: 'kvcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
1010 | buffer->fault = kvcalloc(sizeof(*buffer->fault), buffer->entries, GFP_KERNEL);
| ^
drivers/gpu/drm/nouveau/nouveau_svm.c:1010:40: note: earlier argument should specify number of elements, later size of each element
The behavior is still correct aside from the warning, but fixing it avoids
the warnings and can help the compiler track the individual objects better.
Fixes: 71e4bbca070e ("nouveau/svm: Use kvcalloc() instead of kvzalloc()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212112230.1117284-1-arnd@kernel.org
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions