[15/15] dma-buf: Remove kernel map/unmap hooks
diff mbox series

Message ID 20191118103536.17675-16-daniel.vetter@ffwll.ch
State New
Headers show
Series
  • Retire dma_buf_k(un)map
Related show

Commit Message

Daniel Vetter Nov. 18, 2019, 10:35 a.m. UTC
All implementations are gone now.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
---
 include/linux/dma-buf.h | 25 -------------------------
 1 file changed, 25 deletions(-)

Comments

Daniel Vetter Nov. 18, 2019, 4:43 p.m. UTC | #1
On Mon, Nov 18, 2019 at 4:23 PM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Daniel,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on drm-intel/for-linux-next]
> [also build test ERROR on v5.4-rc8 next-20191115]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

Too old tree, on latest drm-tip this compiles since udl has lots its
own dma-buf implementation. Also, the patch set will start to compile
once linux-next is open for 5.6.

Cheers, Daniel

>
> url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Retire-dma_buf_k-un-map/20191118-184537
> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 7.4.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.4.0 make.cross ARCH=m68k
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>      .map    = kmap_udmabuf,
>       ^~~
>       mmap
> >> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .map    = kmap_udmabuf,
>                ^~~~~~~~~~~~
>    drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
> >> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>      .unmap    = kunmap_udmabuf,
>       ^~~~~
>       vunmap
>    drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .unmap    = kunmap_udmabuf,
>                  ^~~~~~~~~~~~~~
>    drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
>    cc1: some warnings being treated as errors
> --
> >> drivers/gpu/drm/udl/udl_dmabuf.c:169:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>      .map   = udl_dmabuf_kmap,
>       ^~~
>       mmap
> >> drivers/gpu/drm/udl/udl_dmabuf.c:169:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .map   = udl_dmabuf_kmap,
>               ^~~~~~~~~~~~~~~
>    drivers/gpu/drm/udl/udl_dmabuf.c:169:11: note: (near initialization for 'udl_dmabuf_ops.release')
> >> drivers/gpu/drm/udl/udl_dmabuf.c:170:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>      .unmap   = udl_dmabuf_kunmap,
>       ^~~~~
>       vunmap
>    drivers/gpu/drm/udl/udl_dmabuf.c:170:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .unmap   = udl_dmabuf_kunmap,
>                 ^~~~~~~~~~~~~~~~~
>    drivers/gpu/drm/udl/udl_dmabuf.c:170:13: note: (near initialization for 'udl_dmabuf_ops.begin_cpu_access')
>    cc1: some warnings being treated as errors
>
> vim +114 drivers/dma-buf/udmabuf.c
>
> fbb0de79507819 Gerd Hoffmann 2018-08-27  109
> a34852891ba45d Gerd Hoffmann 2018-09-11  110  static const struct dma_buf_ops udmabuf_ops = {
> fbb0de79507819 Gerd Hoffmann 2018-08-27  111    .map_dma_buf      = map_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  112    .unmap_dma_buf    = unmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  113    .release          = release_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27 @114    .map              = kmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27 @115    .unmap            = kunmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  116    .mmap             = mmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  117  };
> fbb0de79507819 Gerd Hoffmann 2018-08-27  118
>
> :::::: The code at line 114 was first introduced by commit
> :::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device
>
> :::::: TO: Gerd Hoffmann <kraxel@redhat.com>
> :::::: CC: Gerd Hoffmann <kraxel@redhat.com>
>
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
Rong Chen Nov. 25, 2019, 12:46 a.m. UTC | #2
On 11/19/19 12:43 AM, Daniel Vetter wrote:
> On Mon, Nov 18, 2019 at 4:23 PM kbuild test robot <lkp@intel.com> wrote:
>> Hi Daniel,
>>
>> I love your patch! Yet something to improve:
>>
>> [auto build test ERROR on drm-intel/for-linux-next]
>> [also build test ERROR on v5.4-rc8 next-20191115]
>> [if your patch is applied to the wrong git tree, please drop us a note to help
>> improve the system. BTW, we also suggest to use '--base' option to specify the
>> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> Too old tree, on latest drm-tip this compiles since udl has lots its
> own dma-buf implementation. Also, the patch set will start to compile
> once linux-next is open for 5.6.
>
> Cheers, Daniel

Hi Daniel,

Thanks for clarifying, we'll take a look at the wrong base.

Best Regards,
Rong Chen

>
>> url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Retire-dma_buf_k-un-map/20191118-184537
>> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
>> config: m68k-allmodconfig (attached as .config)
>> compiler: m68k-linux-gcc (GCC) 7.4.0
>> reproduce:
>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # save the attached .config to linux build tree
>>          GCC_VERSION=7.4.0 make.cross ARCH=m68k
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>>> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>>       .map    = kmap_udmabuf,
>>        ^~~
>>        mmap
>>>> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .map    = kmap_udmabuf,
>>                 ^~~~~~~~~~~~
>>     drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
>>>> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>>       .unmap    = kunmap_udmabuf,
>>        ^~~~~
>>        vunmap
>>     drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .unmap    = kunmap_udmabuf,
>>                   ^~~~~~~~~~~~~~
>>     drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
>>     cc1: some warnings being treated as errors
>> --
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:169:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>>       .map   = udl_dmabuf_kmap,
>>        ^~~
>>        mmap
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:169:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .map   = udl_dmabuf_kmap,
>>                ^~~~~~~~~~~~~~~
>>     drivers/gpu/drm/udl/udl_dmabuf.c:169:11: note: (near initialization for 'udl_dmabuf_ops.release')
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:170:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>>       .unmap   = udl_dmabuf_kunmap,
>>        ^~~~~
>>        vunmap
>>     drivers/gpu/drm/udl/udl_dmabuf.c:170:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .unmap   = udl_dmabuf_kunmap,
>>                  ^~~~~~~~~~~~~~~~~
>>     drivers/gpu/drm/udl/udl_dmabuf.c:170:13: note: (near initialization for 'udl_dmabuf_ops.begin_cpu_access')
>>     cc1: some warnings being treated as errors
>>
>> vim +114 drivers/dma-buf/udmabuf.c
>>
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  109
>> a34852891ba45d Gerd Hoffmann 2018-09-11  110  static const struct dma_buf_ops udmabuf_ops = {
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  111    .map_dma_buf      = map_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  112    .unmap_dma_buf    = unmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  113    .release          = release_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27 @114    .map              = kmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27 @115    .unmap            = kunmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  116    .mmap             = mmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  117  };
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  118
>>
>> :::::: The code at line 114 was first introduced by commit
>> :::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device
>>
>> :::::: TO: Gerd Hoffmann <kraxel@redhat.com>
>> :::::: CC: Gerd Hoffmann <kraxel@redhat.com>
>>
>> ---
>> 0-DAY kernel test infrastructure                 Open Source Technology Center
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
>
>
Daniel Vetter Nov. 26, 2019, 10:54 a.m. UTC | #3
On Mon, Nov 18, 2019 at 11:35:36AM +0100, Daniel Vetter wrote:
> All implementations are gone now.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org

Applied the final two patches of this series now too.
-Daniel

> ---
>  include/linux/dma-buf.h | 25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index 7feb9c3805ae..abf5459a5b9d 100644
> --- a/include/linux/dma-buf.h
> +++ b/include/linux/dma-buf.h
> @@ -249,31 +249,6 @@ struct dma_buf_ops {
>  	 */
>  	int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
>  
> -	/**
> -	 * @map:
> -	 *
> -	 * Maps a page from the buffer into kernel address space. The page is
> -	 * specified by offset into the buffer in PAGE_SIZE units.
> -	 *
> -	 * This callback is optional.
> -	 *
> -	 * Returns:
> -	 *
> -	 * Virtual address pointer where requested page can be accessed. NULL
> -	 * on error or when this function is unimplemented by the exporter.
> -	 */
> -	void *(*map)(struct dma_buf *, unsigned long);
> -
> -	/**
> -	 * @unmap:
> -	 *
> -	 * Unmaps a page from the buffer. Page offset and address pointer should
> -	 * be the same as the one passed to and returned by matching call to map.
> -	 *
> -	 * This callback is optional.
> -	 */
> -	void (*unmap)(struct dma_buf *, unsigned long, void *);
> -
>  	void *(*vmap)(struct dma_buf *);
>  	void (*vunmap)(struct dma_buf *, void *vaddr);
>  };
> -- 
> 2.24.0
>

Patch
diff mbox series

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 7feb9c3805ae..abf5459a5b9d 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -249,31 +249,6 @@  struct dma_buf_ops {
 	 */
 	int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
 
-	/**
-	 * @map:
-	 *
-	 * Maps a page from the buffer into kernel address space. The page is
-	 * specified by offset into the buffer in PAGE_SIZE units.
-	 *
-	 * This callback is optional.
-	 *
-	 * Returns:
-	 *
-	 * Virtual address pointer where requested page can be accessed. NULL
-	 * on error or when this function is unimplemented by the exporter.
-	 */
-	void *(*map)(struct dma_buf *, unsigned long);
-
-	/**
-	 * @unmap:
-	 *
-	 * Unmaps a page from the buffer. Page offset and address pointer should
-	 * be the same as the one passed to and returned by matching call to map.
-	 *
-	 * This callback is optional.
-	 */
-	void (*unmap)(struct dma_buf *, unsigned long, void *);
-
 	void *(*vmap)(struct dma_buf *);
 	void (*vunmap)(struct dma_buf *, void *vaddr);
 };