Skip to contentSkip to conversation

staging: android: ion: fix ion_dma_buf_attach signatur

PATCH In review Christian König 4 participants 5 messages Jun 20, 2018 – Jun 21, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: ion: fix ion_dma_buf_attach signatur

Fixup for "dma_buf: remove device parameter from attach callback v2".

I missed this driver, sorry for the noise. Patch is not even compile tested.

---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.c +2 -2
index a5220445b5e8..3d4d35558937 100644
@@ -201,7 +201,7 @@ struct ion_dma_buf_attachment {
 	struct list_head list;
 };
 
-static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
+static int ion_dma_buf_attach(struct dma_buf *dmabuf,
 			      struct dma_buf_attachment *attachment)
 {
 	struct ion_dma_buf_attachment *a;
@@ -219,7 +219,7 @@ static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
 	}
 
 	a->table = table;
-	a->dev = dev;
+	a->dev = attachment->dev;
 	INIT_LIST_HEAD(&a->list);
 
 	attachment->priv = a;
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Missing 'e' on "signatur". This fixes the build presumably? My guess is that kbuild caught the warning?

Quoted 2 lines · Christian König

Fixup for "dma_buf: remove device parameter from attach callback v2".

I don't think we've applied this? Can't you just resend the original?

Quoted 3 lines

I missed this driver, sorry for the noise. Patch is not even compile tested.

Please put that sort of information under the --- cut off because it doesn't really belong in the final git log.

Quoted 2 lines

---

^^^

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Christian König
I love your patch! Yet something to improve:

Hi Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.18-rc1 next-20180620]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Christian-K-nig/staging-android-ion-fix-ion_dma_buf_attach-signatur/20180621-044136
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=xtensa

All errors (new ones prefixed by >>):

>> drivers/staging/android/ion/ion.c:374:12: error: initialization of 'int (*)(struct dma_buf *, struct device *, struct dma_buf_attachment *)' from incompatible pointer type 'int (*)(struct dma_buf *, struct dma_buf_attachment *)' [-Werror=incompatible-pointer-types]

.attach = ion_dma_buf_attach,
^~~~~~~~~~~~~~~~~~
drivers/staging/android/ion/ion.c:374:12: note: (near initialization for 'dma_buf_ops.attach')
cc1: some warnings being treated as errors

vim +374 drivers/staging/android/ion/ion.c

b892bf75 Rebecca Schultz Zavin 2013-12-13  368  
2328ed66 Bhumika Goyal         2016-10-15  369  static const struct dma_buf_ops dma_buf_ops = {
b892bf75 Rebecca Schultz Zavin 2013-12-13  370  	.map_dma_buf = ion_map_dma_buf,
b892bf75 Rebecca Schultz Zavin 2013-12-13  371  	.unmap_dma_buf = ion_unmap_dma_buf,
b892bf75 Rebecca Schultz Zavin 2013-12-13  372  	.mmap = ion_mmap,
b892bf75 Rebecca Schultz Zavin 2013-12-13  373  	.release = ion_dma_buf_release,
2a55e7b5 Laura Abbott          2017-04-03 @374  	.attach = ion_dma_buf_attach,
2a55e7b5 Laura Abbott          2017-04-03  375  	.detach = ion_dma_buf_detatch,
0f34faf8 Rebecca Schultz Zavin 2013-12-13  376  	.begin_cpu_access = ion_dma_buf_begin_cpu_access,
0f34faf8 Rebecca Schultz Zavin 2013-12-13  377  	.end_cpu_access = ion_dma_buf_end_cpu_access,
f9b67f00 Logan Gunthorpe       2017-04-19  378  	.map_atomic = ion_dma_buf_kmap,
f9b67f00 Logan Gunthorpe       2017-04-19  379  	.unmap_atomic = ion_dma_buf_kunmap,
f9b67f00 Logan Gunthorpe       2017-04-19  380  	.map = ion_dma_buf_kmap,
f9b67f00 Logan Gunthorpe       2017-04-19  381  	.unmap = ion_dma_buf_kunmap,
c30707be Rebecca Schultz Zavin 2013-12-13  382  };

c30707be Rebecca Schultz Zavin 2013-12-13 383

:::::: The code at line 374 was first introduced by commit
:::::: 2a55e7b5e5446c970e00be1bca8536f4a58bf21c staging: android: ion: Call dma_map_sg for syncing and mapping

:::::: TO: Laura Abbott <[email protected]> :::::: CC: Greg Kroah-Hartman <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on v1 1/1
#3 lore raw
In reply to Christian König
Quoted 6 lines · Christian König

Fixup for "dma_buf: remove device parameter from attach callback v2".

I missed this driver, sorry for the noise. Patch is not even compile tested.

Also

Fixes f664a5269542 ("dma-buf: remove kmap_atomic interface")

just for the record. Please push asap, double check that ion is enabled somewhere in one of the 3 drm-misc defconfigs, and reply to Padovan's drm-misc pull request that he needs to redo because of this fumble.

Cheers, Daniel

Quoted 33 lines
---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.c +2 -2
index a5220445b5e8..3d4d35558937 100644
@@ -201,7 +201,7 @@ struct ion_dma_buf_attachment {
 	struct list_head list;
 };
 
-static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
+static int ion_dma_buf_attach(struct dma_buf *dmabuf,
 			      struct dma_buf_attachment *attachment)
 {
 	struct ion_dma_buf_attachment *a;
@@ -219,7 +219,7 @@ static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
 	}
 
 	a->table = table;
-	a->dev = dev;
+	a->dev = attachment->dev;
 	INIT_LIST_HEAD(&a->list);
 
 	attachment->priv = a;
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

Am 21.06.2018 um 08:34 schrieb Daniel Vetter:

Quoted 6 lines · Christian König
Quoted 5 lines

Fixup for "dma_buf: remove device parameter from attach callback v2".

I missed this driver, sorry for the noise. Patch is not even compile tested.

Quoted 6 lines
Quoted 1 line

Also

Fixes f664a5269542 ("dma-buf: remove kmap_atomic interface")

Actually that one was caused by the other patch I pushed, so I didn't added this tag.

Quoted 3 lines

just for the record. Please push asap, double check that ion is enabled somewhere in one of the 3 drm-misc defconfigs, and reply to Padovan's drm-misc pull request that he needs to redo because of this fumble.

Pushed and also enabled ION on my own test build now.

Sorry for the noise,
Christian.

Quoted 27 lines

Cheers, Daniel

Quoted 25 lines
---
  drivers/staging/android/ion/ion.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.c +2 -2
index a5220445b5e8..3d4d35558937 100644
@@ -201,7 +201,7 @@ struct ion_dma_buf_attachment {
  	struct list_head list;
  };
 
-static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
+static int ion_dma_buf_attach(struct dma_buf *dmabuf,
  			      struct dma_buf_attachment *attachment)
  {
  	struct ion_dma_buf_attachment *a;
@@ -219,7 +219,7 @@ static int ion_dma_buf_attach(struct dma_buf *dmabuf, struct device *dev,
  	}
 
  	a->table = table;
-	a->dev = dev;
+	a->dev = attachment->dev;
  	INIT_LIST_HEAD(&a->list);
 
Quoted 8 lines
Quoted 8 lines
drivers/staging/android/ion/ion.c +0 -0
  	attachment->priv = a;
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel