Re: [PATCH v2] dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/19/2017 12:36 PM, Logan Gunthorpe wrote:
Seeing the kunmap_atomic dma_buf_ops share the same name with a macro
in highmem.h, the former can be aliased if any dma-buf user includes
that header.

I'm personally trying to include highmem.h inside scatterlist.h and this
breaks the dma-buf code proper.

Christoph Hellwig suggested [1] renaming it and pushing this patch ASAP.

To maintain consistency I've renamed all four of kmap* and kunmap* to be
map* and unmap*. (Even though only kmap_atomic presently conflicts.)

[1] https://www.spinics.net/lists/target-devel/msg15070.html

Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Reviewed-by: Sinclair Yeh <syeh@xxxxxxxxxx>
---

Changes since v1:

- Added the missing tegra driver (noticed by kbuild robot)
- Rebased off of drm-intel-next to get the i915 selftest that is new
- Fixed nits Sinclair pointed out.

  drivers/dma-buf/dma-buf.c                      | 16 ++++++++--------
  drivers/gpu/drm/armada/armada_gem.c            |  8 ++++----
  drivers/gpu/drm/drm_prime.c                    |  8 ++++----
  drivers/gpu/drm/i915/i915_gem_dmabuf.c         |  8 ++++----
  drivers/gpu/drm/i915/selftests/mock_dmabuf.c   |  8 ++++----
  drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c      |  8 ++++----
  drivers/gpu/drm/tegra/gem.c                    |  8 ++++----
  drivers/gpu/drm/udl/udl_dmabuf.c               |  8 ++++----
  drivers/gpu/drm/vmwgfx/vmwgfx_prime.c          |  8 ++++----
  drivers/media/v4l2-core/videobuf2-dma-contig.c |  4 ++--
  drivers/media/v4l2-core/videobuf2-dma-sg.c     |  4 ++--
  drivers/media/v4l2-core/videobuf2-vmalloc.c    |  4 ++--
  drivers/staging/android/ion/ion.c              |  8 ++++----
  include/linux/dma-buf.h                        | 22 +++++++++++-----------
  14 files changed, 61 insertions(+), 61 deletions(-)


For Ion,

Acked-by: Laura Abbott <labbott@xxxxxxxxxx>

I did some major Ion refactoring but I don't think this
will conflict.

Thanks,
Laura



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux