[PATCH -next] staging/android/ion: remove useless document file

2017-05-06 Thread Yisheng Xie
From: Yisheng Xie <xieyishe...@huawei.com> After commit 9828282e33a0 ("staging: android: ion: Remove old platform support"), the document about devicetree of ion is no need anymore, so just remove it. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- .../devicetre

[PATCH] ion: hisilicon: check the right value after ion_heap_create

2017-05-04 Thread Yisheng Xie
From: Yisheng Xie <xieyishe...@huawei.com> It should check ipdev->heaps[i] whether it is error or null instead of ipdev->heaps, after ion_heap_create() for ipdev->heaps[i]. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/hisilicon/hi6220

Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create

2017-05-04 Thread Yisheng Xie
Hi Laura, On 2017/5/5 1:47, Laura Abbott wrote: > On 05/04/2017 07:45 AM, Yisheng Xie wrote: >> From: Yisheng Xie <xieyishe...@huawei.com> >> >> It should check ipdev->heaps[i] whether it is error or null instead of >> ipdev->heaps, after ion_heap_create(

[PATCH 03/33] Staging: gdm724x: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Quytelda Kahja <quyte...@tamalin.org> Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie <xieyish

[PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v2: - const DRIVER_STRING instead - per Andy drivers/staging/gdm724x

Re: [PATCH v2 03/21] Staging: gdm724x: use match_string() helper

2018-05-31 Thread Yisheng Xie
Hi Greg, On 2018/5/31 19:44, Greg Kroah-Hartman wrote: > On Thu, May 31, 2018 at 07:11:08PM +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Cc: Greg Kroah-Har

[PATCH v3 03/21] Staging: gdm724x: use match_string() helper

2018-06-05 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Greg Kroah-Hartman Cc: Quytelda Kahja Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie --- v3: - no need to check input tty's index - per Greg v2: - const

[PATCH v3 03/27] staging: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
devm_ioremap_nocache. Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: de...@driverdev.osuosl.org Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/fsl-mc/bus/mc-io.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/f

[PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-23 Thread Yisheng Xie
devm_ioremap_nocache for no need to keep a macro around for the duplicate thing. So here comes v3 and please help to review. Thanks so much! Yisheng Xie [1] https://lkml.org/lkml/2017/11/20/135 [2] https://lkml.org/lkml/2017/11/25/21 Yisheng Xie (27): ASOC: replace devm_ioremap_nocache

[PATCH v3 27/27] devres: kill devm_ioremap_nocache

2017-12-23 Thread Yisheng Xie
Now, nobody use devm_ioremap_nocache anymore, can it can just be removed. After this patch the size of devres.o will be reduced from 20304 bytes to 18992 bytes. Suggested-by: Greg KH <gre...@linuxfoundation.org> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- Documentation/

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-24 Thread Yisheng Xie
hi Christophe and Greg, On 2017/12/24 16:55, christophe leroy wrote: > > > Le 23/12/2017 à 16:57, Guenter Roeck a écrit : >> On 12/23/2017 05:48 AM, Greg KH wrote: >>> On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: >>>> Hi all, >>>>

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-24 Thread Yisheng Xie
On 2017/12/24 17:05, christophe leroy wrote: > > > Le 23/12/2017 à 14:48, Greg KH a écrit : >> On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: >>> Hi all, >>> >>> When I tried to use devm_ioremap function and review related code, I found

Re: [PATCH v3 27/27] devres: kill devm_ioremap_nocache

2017-12-24 Thread Yisheng Xie
On 2017/12/23 21:45, Greg KH wrote: > On Sat, Dec 23, 2017 at 07:02:59PM +0800, Yisheng Xie wrote: >> --- a/lib/devres.c >> +++ b/lib/devres.c >> @@ -44,35 +44,6 @@ void __iomem *devm_ioremap(struct device *dev, >> resource_size_t offset, >

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2018-01-12 Thread Yisheng Xie
Hi Christophe , On 2018/1/4 16:05, Christophe LEROY wrote: > > > Le 25/12/2017 à 02:34, Yisheng Xie a écrit : >> >> >> On 2017/12/24 17:05, christophe leroy wrote: >>> >>> >>> Le 23/12/2017 à 14:48, Greg KH a écrit : >>>> On Sat,

[PATCH] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-01-30 Thread Yisheng Xie
ion_buffer_fault_user_mappings's definition has been removed and not be used anymore, just remove its useless declaration. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/a

[PATCH 1/2] staging: android: ion: Avoid NULL point in error path

2018-02-01 Thread Yisheng Xie
of debug_root, then a NULL point will occur. Fix this by avoiding call dentry_path, but show the debug name only when failed to create debug file for shrinker. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c | 10 +++--- 1 file changed, 3 insertions

[PATCH 2/2] staging: android: ion: Remove lable debugfs_done

2018-02-01 Thread Yisheng Xie
When failed to create debug_root, we will go on initail other part of ion, so we can just info this message to user and do not need a lable to jump. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c | 5 + 1 file changed, 1 insertion(+), 4 del

Re: [PATCH] staging: android: ion: minor cleanup for ion_page_pool

2018-01-31 Thread Yisheng Xie
Hi Greg, On 2018/1/31 19:32, Greg KH wrote: > On Wed, Jan 31, 2018 at 05:50:52PM +0800, Yisheng Xie wrote: >> ion_page_pool.c now is used to apply pool APIs for system heap, which do >> not need do any initial at device_initcall. >> >> Meanwhile, this patch also remove

[PATCH resend 3/3] staging: android: ion: Nuke ion_page_pool_init

2018-01-31 Thread Yisheng Xie
ion_page_pool.c now is used to apply pool APIs for system heap, which do not need do any initial at device_initcall. Therefore ion_page_pool_init can be nuked. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 7 --- 1 file chan

[PATCH resend 1/3] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-01-31 Thread Yisheng Xie
ion_buffer_fault_user_mappings's definition has been removed and not be used anymore, just remove its useless declaration. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/a

[PATCH resend 2/3] staging: android: ion: Remove unused include files for ion_page_pool.c

2018-01-31 Thread Yisheng Xie
After rewrite of ion_page_pool, some of its include file is no need anymore, just remove it. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_poo

[PATCH] staging: android: ion: minor cleanup for ion_page_pool

2018-01-31 Thread Yisheng Xie
ion_page_pool.c now is used to apply pool APIs for system heap, which do not need do any initial at device_initcall. Meanwhile, this patch also remove some useless include files. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.

[PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-04 Thread Yisheng Xie
ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool

[PATCH 2/2] staging: android: ion: Return void instead of int

2018-02-04 Thread Yisheng Xie
Now, nobody care about the return value of ion_page_pool_add, therefore we can just make it return void. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/s

Re: [PATCH 2/2] staging: android: ion: Combine cache and uncache pools

2018-02-07 Thread Yisheng Xie
Hi Sumit, On 2018/2/7 22:34, Sumit Semwal wrote: > Hello Yisheng, > > On 7 February 2018 at 09:29, Yisheng Xie <xieyishe...@huawei.com> wrote: >> Now we call dma_map in the dma_buf API callbacks and handle explicit >> caching by the dma_buf sync API, which m

Re: [PATCH] staging: android: ion: minor cleanup for ion_page_pool

2018-02-06 Thread Yisheng Xie
Hi Laura, On 2018/2/7 6:51, Laura Abbott wrote: > On 01/31/2018 01:50 AM, Yisheng Xie wrote: >> ion_page_pool.c now is used to apply pool APIs for system heap, which do >> not need do any initial at device_initcall. >> >> Meanwhile, this patch also remove some useless i

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-06 Thread Yisheng Xie
Hi Laura, On 2018/2/7 7:11, Laura Abbott wrote: > On 02/06/2018 03:10 PM, Laura Abbott wrote: >> On 02/04/2018 07:26 PM, Yisheng Xie wrote: >>> ion_page_pool_add will always return 0, however ion_page_pool_free will >>> call ion_page_pool_free_pages when ion_p

[PATCH 2/2] staging: android: ion: Combine cache and uncache pools

2018-02-06 Thread Yisheng Xie
Now we call dma_map in the dma_buf API callbacks and handle explicit caching by the dma_buf sync API, which make cache and uncache pools in the same handling flow, which can be combined. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c

[PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-06 Thread Yisheng Xie
ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page pools. If alloc_pages return NULL, it will return NULL, or it will return the pages allocate from alloc_pages. So we can just return alloc_pages without any judgement. Signed-off-by: Yisheng Xie <xieyishe...@huawei.

[PATCH v2 3/9] staging: android: ion: Nuke ion_page_pool_init

2018-02-12 Thread Yisheng Xie
ion_page_pool.c now is used to apply pool APIs for system heap, which do not need do any initial at device_initcall. Therefore ion_page_pool_init can be nuked. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 7 --- 1 file chan

[PATCH v2 6/9] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-12 Thread Yisheng Xie
ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Acked-by: Laura Abbott <labb...@redhat.com> Signed-off-by: Yisheng Xie <xieyishe...@h

Re: [PATCH 1/2] staging: android: ion: Avoid NULL point in error path

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/1 20:34, Yisheng Xie wrote: > If we failed to create debugfs for ion at ion_device_create, the > debug_root of ion_device will be NULL, and then when try to create

Re: [PATCH 1/2] staging: android: ion: Remove dead code in ion_page_pool_free

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/5 11:26, Yisheng Xie wrote: > ion_page_pool_add will always return 0, however ion_page_pool_free will > call ion_page_pool_free_pages when ion_page_pool_add's

Re: [PATCH 1/2] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/7 11:59, Yisheng Xie wrote: > ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page > pools. If alloc_pages return NULL, it will retur

Re: [PATCH v2 0/9] staging: android: ion: Some cleanup about ion

2018-02-12 Thread Yisheng Xie
Hi Dan, On 2018/2/12 19:17, Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 06:43:05PM +0800, Yisheng Xie wrote: >> Hi all, >> >> When I tried to review the code of ion, I find that there are many place >> can be cleanup, so I post this patchset. >> >> I

Re: [PATCH resend 1/3] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-12 Thread Yisheng Xie
Hi Greg, JFYI, I have rebase this patchset to v4.15-rc1.[1] [1] https://lkml.org/lkml/2018/2/12/204 Thanks Yisheng On 2018/2/1 9:54, Yisheng Xie wrote: > ion_buffer_fault_user_mappings's definition has been removed and not be > used anymore, just remove its useless declaration. > >

[PATCH v2 0/9] staging: android: ion: Some cleanup about ion

2018-02-12 Thread Yisheng Xie
acks and rebase them to v4.15-rc1. Thanks. [1] https://lkml.org/lkml/2018/1/31/711 [2] https://lkml.org/lkml/2018/2/1/240 [3] https://lkml.org/lkml/2018/2/4/320 [4] https://lkml.org/lkml/2018/2/6/949 Yisheng Xie (9): staging: android: ion: Remove unused declaration

[PATCH v2 5/9] staging: android: ion: Remove lable debugfs_done

2018-02-12 Thread Yisheng Xie
When failed to create debug_root, we will go on initail other part of ion, so we can just info this message to user and do not need a lable to jump. Acked-by: Laura Abbott <labb...@redhat.com> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c

[PATCH v2 9/9] staging: android: ion: Combine cache and uncache pools

2018-02-12 Thread Yisheng Xie
Now we call dma_map in the dma_buf API callbacks and handle explicit caching by the dma_buf sync API, which make cache and uncache pools in the same handling flow, which can be combined. Acked-by: Sumit Semwal <sumit.sem...@linaro.org> Signed-off-by: Yisheng Xie <xieyishe...@h

[PATCH v2 8/9] staging: android: ion: Cleanup ion_page_pool_alloc_pages

2018-02-12 Thread Yisheng Xie
Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index e3a6e32..6d

[PATCH v2 4/9] staging: android: ion: Avoid NULL point in error path

2018-02-12 Thread Yisheng Xie
of debug_root, then a NULL point will occur. Fix this by avoiding call dentry_path, but show the debug name only when failed to create debug file for shrinker. Acked-by: Laura Abbott <labb...@redhat.com> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/io

[PATCH v2 1/9] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-12 Thread Yisheng Xie
ion_buffer_fault_user_mappings's definition has been removed and not be used anymore, just remove its useless declaration. Acked-by: Laura Abbott <labb...@redhat.com> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.h | 9 - 1 fil

[PATCH v2 2/9] staging: android: ion: Remove unused include files for ion_page_pool.c

2018-02-12 Thread Yisheng Xie
After rewrite of ion_page_pool, some of its include file is no need anymore, just remove it. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_poo

[PATCH v2 7/9] staging: android: ion: Return void instead of int

2018-02-12 Thread Yisheng Xie
Now, nobody care about the return value of ion_page_pool_add, therefore we can just make it return void. Acked-by: Laura Abbott <labb...@redhat.com> Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion_page_pool.c | 3 +-- 1 file changed, 1 ins

Re: [PATCH resend 1/3] staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

2018-02-13 Thread Yisheng Xie
Hi Greg On 2018/2/12 19:40, Yisheng Xie wrote: > Hi Greg, > > JFYI, I have rebase this patchset to v4.15-rc1.[1] Ah, sorry , I mean v4.16-rc1, and the same to other threads. Thanks Yisheng > > [1] https://lkml.org/lkml/2018/2/12/204 > > Thanks > Yisheng > >

Re: [PATCH v2 4/9] staging: android: ion: Avoid NULL point in error path

2018-02-22 Thread Yisheng Xie
Hi Greg, Sorry for late responds for I was on vacation. On 2018/2/17 0:27, Greg KH wrote: > On Mon, Feb 12, 2018 at 06:43:09PM +0800, Yisheng Xie wrote: >> If we failed to create debugfs for ion at ion_device_create, the >> debug_root of ion_device will be NULL, and then when try

[PATCH -next 2/2] staging: android: ion: Remove check of idev->debug_root

2018-02-22 Thread Yisheng Xie
We will go on initial idev if failed to create debug_root, and it does not matter to check the return value of this debugfs call, just remove it. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH -next 1/2] staging: android: ion: Remove check of debug_file

2018-02-22 Thread Yisheng Xie
There's no need to check the return value of debug_file for it is just a debugfs and we will go on the following process if we failed to create debug_file. So just remove it. Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> --- drivers/staging/android/ion/ion.c | 9 ++--- 1 file c

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2018-01-02 Thread Yisheng Xie
+ cris/ia64/mn10300/openrisc maintainers On 2017/12/25 9:09, Yisheng Xie wrote: > hi Christophe and Greg, > > On 2017/12/24 16:55, christophe leroy wrote: >> >> >> Le 23/12/2017 à 16:57, Guenter Roeck a écrit : >>> On 12/23/2017 05:48 AM, Greg KH wrote: >

[PATCH] staging: android: ashmem: Fix possible deadlock in ashmem_ioctl

2018-02-27 Thread Yisheng Xie
ve copy_from_user out of ashmem_mutex. [1] https://www.spinics.net/lists/kernel/msg2733200.html Fixes: ce8a3a9e76d0 (staging: android: ashmem: Fix a race condition in pin ioctls) Reported-by: syzbot+d7a918a7a8e1c952b...@syzkaller.appspotmail.com Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> -