Skip to content

Commit

Permalink
accel/ivpu: avoid duplicate assignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
arndb authored and jlawryno committed Jan 31, 2023
1 parent df5bf3b commit 918b8f7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/accel/ivpu/ivpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ int ivpu_shutdown(struct ivpu_device *vdev)

static const struct file_operations ivpu_fops = {
.owner = THIS_MODULE,
.mmap = drm_gem_mmap,
DRM_ACCEL_FOPS,
};

Expand Down

0 comments on commit 918b8f7

Please sign in to comment.