linux/drivers/gpu/drm
Arnd Bergmann 7a17d2cd3e nouveau/svm: fix kvcalloc() argument order
[ Upstream commit 2c80a2b715 ]

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: 71e4bbca07 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-02-23 09:51:27 +01:00
..
amd Revert "drm/amd/pm: fix the high voltage and temperature issue" 2024-02-16 19:14:28 +01:00
arm Merge tag 'drm-misc-next-2023-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-29 08:27:15 +10:00
armada drm/armada: Call drm_atomic_helper_shutdown() at shutdown time 2023-09-21 10:38:11 -07:00
aspeed drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-09-21 10:51:55 -07:00
ast drm/ast: Disconnect BMC if physical connector is connected 2023-11-21 09:40:08 +01:00
atmel-hlcdc drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
bridge drm/bridge: anx7625: Fix Set HPD irq detect window to 2ms 2024-02-05 20:16:57 +00:00
ci drm/ci: make github dependabot happy again 2023-11-13 08:52:24 -08:00
display drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:44:57 -08:00
etnaviv drm/sched: Convert the GPU scheduler to variable number of run-queues 2023-10-26 12:03:47 -04:00
exynos drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time 2024-02-05 20:16:59 +00:00
fsl-dcu drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
gma500 drm/gma500: refactor deprecated strncpy 2023-09-27 12:38:54 +02:00
gud drm/gud: Use size_add() in call to struct_size() 2023-09-29 14:48:32 -07:00
hisilicon drm/hisilicon/kirin: Call drm_atomic_helper_shutdown() at shutdown/unbind time 2023-09-21 10:54:20 -07:00
hyperv TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
i2c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00
i915 drm/i915/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg address 2024-02-23 09:51:27 +01:00
imx drm/imx/lcdc: Fix double-free of driver data 2024-01-25 15:45:00 -08:00
ingenic drm/ingenic: Call drm_atomic_helper_shutdown() at shutdown time 2023-09-13 11:12:20 -07:00
kmb drm/kmb: Use GEM DMA fbdev emulation 2023-03-14 17:07:48 +01:00
lib drm/selftests: add drm buddy alloc range testcase 2022-02-23 10:44:43 +01:00
lima drm/sched: Convert the GPU scheduler to variable number of run-queues 2023-10-26 12:03:47 -04:00
logicvc Merge tag 'drm-misc-fixes-2023-11-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-11-10 16:57:49 +01:00
loongson drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
mcde drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
mediatek drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency 2024-01-25 15:45:06 -08:00
meson drm/meson: fix memory leak on ->hpd_notify callback 2023-09-20 15:44:31 +02:00
mgag200 drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2023-12-20 13:26:57 +01:00
msm drm/msm/gem: Fix double resv lock aquire 2024-02-23 09:51:23 +01:00
mxsfb drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
nouveau nouveau/svm: fix kvcalloc() argument order 2024-02-23 09:51:27 +01:00
omapdrm Revert "drm/omapdrm: Annotate dma-fence critical section in commit path" 2024-01-25 15:44:57 -08:00
panel drm/panel-edp: Add override_edid_mode quirk for generic edp 2024-02-05 20:16:57 +00:00
panfrost drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq 2024-01-25 15:45:01 -08:00
pl111 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-09-21 10:51:55 -07:00
qxl drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:21:13 -08:00
radeon gpu/drm/radeon: fix two memleaks in radeon_vm_init 2024-01-25 15:45:05 -08:00
renesas drm: renesas: shmobile: Add DT support 2023-10-16 11:47:48 +02:00
rockchip drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full 2023-11-20 17:06:06 +01:00
scheduler drm/sched: Fix bounds limiting when given a malformed entity 2024-01-25 15:44:59 -08:00
solomon drm/ssd130x: Fix possible uninitialized usage of crtc_state variable 2023-10-30 11:00:27 +01:00
sprd drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sti drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
stm drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-09-21 10:51:55 -07:00
sun4i Merge tag 'drm-misc-next-2023-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-29 08:27:15 +10:00
tegra drm/tegra: gem: Do not return NULL in tegra_bo_mmap() 2023-10-11 22:52:44 +02:00
tests drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:44:57 -08:00
tidss drm/tidss: Fix atomic_flush check 2024-01-31 16:21:13 -08:00
tilcdc drm/tilcdc: Fix irq free on unload 2024-01-25 15:44:58 -08:00
tiny Linux 6.6-rc7 2023-10-23 18:20:06 +10:00
ttm Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
tve200 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-09-21 10:51:55 -07:00
udl drm/udl: Convert to drm_crtc_helper_atomic_check() 2023-07-29 21:01:27 +02:00
v3d drm/sched: Convert the GPU scheduler to variable number of run-queues 2023-10-26 12:03:47 -04:00
vboxvideo drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:21:13 -08:00
vc4 Merge tag 'drm-misc-fixes-2023-11-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-11-10 16:57:49 +01:00
vgem drm/vgem: Drop struct drm_vgem_gem_object 2023-03-20 08:14:27 -03:00
virtio drm/virtio: Disable damage clipping if FB changed since last page-flip 2024-01-31 16:21:13 -08:00
vkms Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit" 2023-09-14 07:48:19 -03:00
vmwgfx drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:21:13 -08:00
xen drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
xlnx drm: xlnx: zynqmp_dpsub: Use devm_platform_ioremap_resource_byname() 2023-08-02 01:36:54 +03:00
drm_agpsupport.c drm: Include <asm/agp.h> iff CONFIG_AGP is set 2021-05-11 14:13:33 +02:00
drm_aperture.c video/aperture: Drop primary argument 2023-04-16 14:17:55 +02:00
drm_atomic.c Merge tag 'drm-misc-next-2023-09-11-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-22 16:28:36 +10:00
drm_atomic_helper.c drm/atomic-helpers: Invoke end_fb_access while owning plane state 2023-12-06 10:51:27 +01:00
drm_atomic_state_helper.c drm/atomic-helper: fix kernel-doc problems 2023-01-19 09:16:04 +01:00
drm_atomic_uapi.c drm/atomic: log errors in drm_mode_atomic_ioctl() 2023-06-23 16:34:25 +02:00
drm_auth.c drm: Fix FD ownership check in drm_master_check_perm() 2023-12-07 14:51:37 +01:00
drm_blend.c drm/drm_blend: Remove usage of deprecated DRM_DEBUG_ATOMIC 2023-01-10 16:14:13 +01:00
drm_bridge.c drm/debugfs: rework debugfs directory creation v5 2023-09-01 08:51:18 +02:00
drm_bridge_connector.c drm/bridge_connector: implement oob_hotplug_event 2023-10-11 13:20:22 +03:00
drm_buddy.c Merge tag 'drm-misc-next-2023-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-09-29 08:27:15 +10:00
drm_bufs.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_cache.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
drm_client.c drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2() 2023-10-24 12:21:01 -04:00
drm_client_modeset.c drm/client: Fix memory leak in drm_client_modeset_probe 2023-07-13 15:55:58 +02:00
drm_color_mgmt.c drm: fix whitespace in drm_plane_create_color_properties() 2022-08-04 15:24:46 +02:00
drm_connector.c drm: Add HPD state to drm_connector_oob_hotplug_event() 2023-10-11 13:20:22 +03:00
drm_context.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_crtc.c drm/crtc: fix uninitialized variable use 2023-12-08 15:47:39 +01:00
drm_crtc_helper.c drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
drm_crtc_helper_internal.h drm/dp: Move DP declarations into separate header file 2022-01-17 11:25:44 +01:00
drm_crtc_internal.h drm/debugfs: rework debugfs directory creation v5 2023-09-01 08:51:18 +02:00
drm_damage_helper.c drm: Allow drivers to indicate the damage helpers to ignore damage clips 2024-01-31 16:21:13 -08:00
drm_debugfs.c drm/gpuvm: rename struct drm_gpuva_manager to struct drm_gpuvm 2023-09-26 01:51:28 +02:00
drm_debugfs_crc.c drm/doc: document how userspace should find out CRTC index 2021-06-10 19:14:47 +02:00
drm_displayid.c drm/displayid: provide access to DisplayID version and primary use case 2023-02-27 02:58:38 +03:00
drm_dma.c drm: remove usage of drm_pci_alloc/free 2021-04-26 18:19:15 +02:00
drm_drv.c drm/drv: propagate errors from drm_modeset_register_all() 2024-01-25 15:45:01 -08:00
drm_dumb_buffers.c drm: remove dumb_destroy callback 2023-02-10 12:19:27 +01:00
drm_edid.c drm/edid: also call add modes in EDID connector update fallback 2023-12-11 14:41:14 +02:00
drm_edid_load.c drm/edid/firmware: stop using a throwaway platform device 2022-11-16 14:54:44 +02:00
drm_encoder.c drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_encoder_slave.c drm: encoder_slave: use new I2C API 2020-06-19 09:20:21 +02:00
drm_exec.c drm/drm_exec: Work around a WW mutex lockdep oddity 2023-09-07 10:30:12 +02:00
drm_fb_dma_helper.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_fb_helper.c tty: sysrq: switch sysrq handlers from int to u8 2023-07-25 19:21:03 +02:00
drm_fbdev_dma.c fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
drm_fbdev_generic.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
drm_file.c drm/drm_file: fix use of uninitialized variable 2024-02-05 20:16:58 +00:00
drm_flip_work.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_format_helper.c drm/format-helper: Support the AB24/XB24 formats 2023-01-23 15:02:41 +01:00
drm_fourcc.c drm/fourcc: Add NV20 and NV30 YUV formats 2023-10-24 21:34:35 +02:00
drm_framebuffer.c drm/framebuffer: Fix use of uninitialized variable 2024-02-05 20:16:58 +00:00
drm_gem.c drm: Do not overrun array in drm_gem_get_pages() 2023-10-12 10:44:06 +02:00
drm_gem_atomic_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_gem_dma_helper.c - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Consistenly use drm_dbg_kms() 2023-07-28 11:46:02 +02:00
drm_gem_shmem_helper.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
drm_gem_ttm_helper.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
drm_gem_vram_helper.c drm/vram-helper: fix function names in vram helper doc 2023-05-08 09:16:18 +02:00
drm_gpuvm.c drm/gpuvm: Fix deprecated license identifier 2023-11-28 11:19:26 +01:00
drm_hashtab.c drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_internal.h Merge drm/drm-next into drm-intel-next 2023-10-04 18:06:27 +03:00
drm_ioc32.c arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
drm_ioctl.c drm: Update file owner during use 2023-09-20 15:27:44 +02:00
drm_irq.c drm: Build drm_irq.o only if CONFIG_DRM_LEGACY has been set 2021-10-22 16:20:12 +02:00
drm_kms_helper_common.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_lease.c drm_lease.c: copy user-array safely 2023-10-09 16:59:49 +10:00
drm_legacy.h drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_legacy_misc.c drm: IRQ midlayer is now legacy 2021-08-10 20:14:01 +02:00
drm_lock.c drm : Insert blank lines after declarations. 2020-07-02 15:26:00 +02:00
drm_managed.c Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
drm_memory.c drm: Mark AGP implementation and ioctls as legacy 2021-05-10 15:46:58 +02:00
drm_mipi_dbi.c drm/mipi-dbi: Lock SPI bus before setting D/C GPIO 2023-08-02 13:18:07 +02:00
drm_mipi_dsi.c drm/mipi-dsi: Fix detach call without attach 2024-02-05 20:16:58 +00:00
drm_mm.c lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() 2022-01-22 08:33:37 +02:00
drm_mode_config.c drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2 2023-09-01 08:53:05 +02:00
drm_mode_object.c drm/kms: log when querying an object not included in lease 2023-06-23 16:38:00 +02:00
drm_modes.c drm: Fix comment on mode parsing 2023-02-20 14:56:52 +01:00
drm_modeset_helper.c drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro 2022-09-20 09:42:31 +02:00
drm_modeset_lock.c lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() 2022-01-22 08:33:37 +02:00
drm_of.c drm: of: Add drm_of_get_dsi_bus helper function 2023-01-27 09:39:21 +01:00
drm_panel.c drm/panel: Add a way for other devices to follow panel state 2023-08-01 07:38:13 -07:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Lenovo Legion Go 2023-11-15 16:57:08 +01:00
drm_pci.c drm: Mark IRQ_BUSID ioctl as legacy 2021-05-17 21:19:48 +02:00
drm_plane.c drm: Disable the cursor plane on atomic contexts with virtualized drivers 2024-01-31 16:21:13 -08:00
drm_plane_helper.c drm: Remove references to removed transitional helpers 2023-07-29 21:25:16 +02:00
drm_prime.c Revert "drm/prime: Unexport helpers for fd/handle conversion" 2023-11-30 14:46:04 -05:00
drm_print.c drm_print: add _ddebug descriptor to drm_*dbg prototypes 2022-09-24 15:02:02 +02:00
drm_privacy_screen.c drm-misc-next for v5.18: 2022-02-25 05:50:18 +10:00
drm_privacy_screen_x86.c drm-misc-next for v5.18: 2022-02-01 19:02:41 +10:00
drm_probe_helper.c drm: Add an HPD poll helper to reschedule the poll work 2023-08-23 17:14:37 -04:00
drm_property.c drm: property: Replace strncpy() with strscpy_pad() 2021-10-07 05:42:13 +03:00
drm_rect.c gpu/drm: fix repeated words in comments 2022-10-24 09:27:04 +02:00
drm_scatter.c gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc 2020-06-02 10:59:11 -07:00
drm_self_refresh_helper.c drm/atomic: fix self-refresh helpers crtc state dereference 2019-11-06 13:00:21 -05:00
drm_simple_kms_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_suballoc.c drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper 2023-03-01 17:18:19 +01:00
drm_syncobj.c drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE 2023-10-26 21:20:25 +02:00
drm_sysfs.c drm/sysfs: Register "ddc" symlink later 2023-09-15 14:46:42 +03:00
drm_trace.h drm: Add high-precision time to vblank trace event 2019-09-03 09:46:18 +02:00
drm_trace_points.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vblank.c drm/vblank: Fix for drivers that do not drm_vblank_init() 2023-04-04 22:38:03 +02:00
drm_vblank_work.c drm/vblank: Warn when silently cancelling vblank works 2023-10-03 16:01:03 +03:00
drm_vm.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
drm_vma_manager.c drm/drm_vma_manager: Add drm_vma_node_allow_once() 2023-01-19 14:16:55 +01:00
drm_writeback.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
Kconfig Linux 6.6-rc7 2023-10-23 18:20:06 +10:00
Makefile drm/gpuvm: allow building as module 2023-09-26 01:58:28 +02:00