diff options
author | Sam James <sam@gentoo.org> | 2023-11-07 21:55:33 +0000 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-11-09 13:05:17 +0200 |
commit | bae9fca9684335478ff147413bd69c8d77b66cf9 (patch) | |
tree | 6630fd579dc75dfa56d3391e07847ac6c70734f0 /tools/perf/scripts/python | |
parent | 1d9e6bc97eabac150b775d91d9a656ba24e92014 (diff) |
drm: i915: Adapt to -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which errors out
like:
```
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c: In function ‘eb_copy_relocations’:
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1681:24: error: allocation of insufficient size ‘1’ for type ‘struct drm_i915_gem_relocation_entry’ with size ‘32’ [-Werror=alloc-size]
1681 | relocs = kvmalloc_array(size, 1, GFP_KERNEL);
| ^
```
So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 element of size `size`. GCC then sees we're not
doing anything wrong.
Signed-off-by: Sam James <sam@gentoo.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231107215538.1891359-1-sam@gentoo.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions