Skip to content

Commit 4739e89

Browse files
arndbtdz
authored andcommitted
accel/ivpu: avoid duplicate assignment
With extra warnings enabled, gcc warns about two assignments of the same .mmap callback: In file included from drivers/accel/ivpu/ivpu_drv.c:10: include/drm/drm_accel.h:31:27: error: initialized field overwritten [-Werror=override-init] 31 | .mmap = drm_gem_mmap | ^~~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.c:360:9: note: in expansion of macro 'DRM_ACCEL_FOPS' 360 | DRM_ACCEL_FOPS, | ^~~~~~~~~~~~~~ Remove the unused local assignment. Fixes: e868cc5 ("accel: Add .mmap to DRM_ACCEL_FOPS") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230126163804.3648051-2-arnd@kernel.org (cherry picked from commit 918b8f7) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
1 parent 9f20c9f commit 4739e89

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ int ivpu_shutdown(struct ivpu_device *vdev)
356356

357357
static const struct file_operations ivpu_fops = {
358358
.owner = THIS_MODULE,
359-
.mmap = drm_gem_mmap,
360359
DRM_ACCEL_FOPS,
361360
};
362361

0 commit comments

Comments
 (0)