Re: [PATCH 08/12] Drivers: hv: vmbus: Implement Direct Mode for stimer0

2018-02-12 Thread Dan Carpenter
On Sun, Feb 11, 2018 at 05:33:16PM -0700, k...@exchange.microsoft.com wrote: > @@ -116,9 +146,29 @@ static int hv_ce_set_oneshot(struct clock_event_device > *evt) > { > union hv_timer_config timer_cfg; > > + timer_cfg.as_uint64 = 0; > timer_cfg.enable = 1; > timer_cfg.auto

[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 --- drivers/staging/android/ion/ion_page_pool.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/dri

[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 Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 6

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

2018-02-12 Thread Yisheng Xie
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 debug file for shrinker of heap it will be create on the top of debugfs. If we also failed to create this the debug file, it call dentry_path to found the path of debu

[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 Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/android/

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

2018-02-12 Thread Yisheng Xie
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 mark it as v2, because I have post them in different patchset before[1][2] [3][4]. And now, I combine them in one patchset to make it easy to review, Meanwhile, I add some a

[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 Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[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 --- drivers/staging/android/ion/ion_page_pool.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/io

[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 Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion_page_pool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/androi

[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 Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5 --

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

2018-02-12 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. Acked-by: Sumit Semwal Signed-off-by: Yisheng Xie --- dr

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

2018-02-12 Thread Dan Carpenter
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 mark it as v2, because I have post them in different patchset before[1][2] > [3][4]. And now, I comb

[PATCH v2] staging: vt6656: Remove unnecessary 'out of memory' message

2018-02-12 Thread Dileep Sankhla
This patch removes the unnecessary out of memory message fixing the following checkpatch.pl warning in usbpipe.c: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Dileep Sankhla --- Change in v2: - changed commit message --- drivers/staging/vt6656/usbpipe.c | 3 --- 1 file ch

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 mark it as v2, because I have post them in d

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. > > Signed-off-

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 debug

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 return valu

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 return NULL, or it will

[PATCH 0/4] staging: iio: accel: adis16201 driver cleanup

2018-02-12 Thread Himanshu Jha
The following patch series cleans up miscellaneous code fragments and then the driver is moved from staging to mainline IIO subsytem directory. Note that the last patch to move driver is *not* generated using '-M' flag, which is used for detecting renames, since it may help reviewers to suggest mor

[PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Himanshu Jha
Move the adis16201 driver out of staging directory and merge to the mainline IIO directory. Signed-off-by: Himanshu Jha --- drivers/iio/accel/Kconfig | 12 ++ drivers/iio/accel/Makefile| 1 + drivers/iio/accel/adis16201.c | 315 +

[PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-12 Thread Himanshu Jha
Use sign_extend32 function instead of manually coding it. Also, adjust a switch block to explicitly match channels and return -EINVAL as default case which improves code readability. Signed-off-by: Himanshu Jha --- drivers/staging/iio/accel/adis16201.c | 13 - 1 file changed, 8 inser

[PATCH 1/4] staging: iio: accel: adis16201: Use SPDX identifier

2018-02-12 Thread Himanshu Jha
Use SPDX identifier format instead of GPLv2. Also, rearrange the headers in the alphabetical order. Signed-off-by: Himanshu Jha --- drivers/staging/iio/accel/adis16201.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/st

[PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix

2018-02-12 Thread Himanshu Jha
Remove some unnecessary comments by giving appropriate name to macros. Therefore, add _REG suffix for control registers. Also, align function arguments to match open parentheses using tabs. Group the control register and register field macros together. Blank line before some returns improves code

[PATCH] staging: media: reformat line to 80 chars or less

2018-02-12 Thread Parthiban Nallathambi
This is a cleanup patch to fix line length issue found by checkpatch.pl script. In this patch, line 144 have been wrapped. Signed-off-by: Parthiban Nallathambi --- drivers/staging/media/imx/imx-media-capture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging

Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix

2018-02-12 Thread Dan Carpenter
On Mon, Feb 12, 2018 at 05:24:57PM +0530, Himanshu Jha wrote: > Remove some unnecessary comments by giving appropriate name to macros. > Therefore, add _REG suffix for control registers. Also, align function > arguments to match open parentheses using tabs. > Group the control register and register

Re: [PATCH 3/4] staging: iio: accel: Use sign_extend32 and adjust a switch statement

2018-02-12 Thread Dan Carpenter
On Mon, Feb 12, 2018 at 05:24:58PM +0530, Himanshu Jha wrote: > Use sign_extend32 function instead of manually coding it. Also, adjust a ^ > switch block to explicitly match channels and return -EINVAL as default > case which improves

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Dan Carpenter
I think -M is prefered for these types of diffs? Not sure. On Mon, Feb 12, 2018 at 05:24:59PM +0530, Himanshu Jha wrote: > +static int adis16201_probe(struct spi_device *spi) > +{ > + struct iio_dev *indio_dev; > + struct adis *st; > + int ret; > + > + indio_dev = devm_iio_device_

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Philippe Ombredanne
On Mon, Feb 12, 2018 at 12:54 PM, Himanshu Jha wrote: > Move the adis16201 driver out of staging directory and merge to the > mainline IIO directory. > > Signed-off-by: Himanshu Jha > --- /dev/null > +++ b/drivers/iio/accel/adis16201.c > @@ -0,0 +1,315 @@ > +// SPDX-License-Identifier: GPL-2.0+

DONATION FOR less-privileged

2018-02-12 Thread Mrs. JULIETTE ROMUALDEZ
My name is Mrs. Juliette Romualdez from Philippine. I am a sick woman who has decided to donate what I have to charity through you. You may be wondering why I chose you. But someone has to be chosen. I am 62 years old and was diagnosed for cancer about 2 years ago, I inherited a total sum of $6.150

Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix

2018-02-12 Thread Himanshu Jha
Hi Dan, On Mon, Feb 12, 2018 at 03:53:12PM +0300, Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 05:24:57PM +0530, Himanshu Jha wrote: > > Remove some unnecessary comments by giving appropriate name to macros. > > Therefore, add _REG suffix for control registers. Also, align function > > arguments

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Himanshu Jha
On Mon, Feb 12, 2018 at 03:10:56PM +0100, Philippe Ombredanne wrote: > On Mon, Feb 12, 2018 at 12:54 PM, Himanshu Jha > wrote: > > Move the adis16201 driver out of staging directory and merge to the > > mainline IIO directory. > > > > Signed-off-by: Himanshu Jha > > > > --- /dev/null > > +++ b/

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Himanshu Jha
On Mon, Feb 12, 2018 at 04:18:26PM +0300, Dan Carpenter wrote: > I think -M is prefered for these types of diffs? Not sure. I wrote about that in the cover letter if you missed. :) > On Mon, Feb 12, 2018 at 05:24:59PM +0530, Himanshu Jha wrote: > > +static int adis16201_probe(struct spi_device *

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Dan Carpenter
On Mon, Feb 12, 2018 at 08:11:57PM +0530, Himanshu Jha wrote: > On Mon, Feb 12, 2018 at 04:18:26PM +0300, Dan Carpenter wrote: > > I think -M is prefered for these types of diffs? Not sure. > > I wrote about that in the cover letter if you missed. :) > Yeah. I seldom read cover letters. > > >

Re: ion kernel mapping implementation

2018-02-12 Thread Laura Abbott
On 02/10/2018 01:43 AM, Alexey Skidanov wrote: Hi, Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32 bit platforms, vmap() might fail on large enough buffers due to the limited available vmalloc space. dma_buf_kmap

Re: KASAN: use-after-free Read in remove_wait_queue

2018-02-12 Thread Al Viro
On Mon, Feb 12, 2018 at 06:11:02PM +0100, Dmitry Vyukov wrote: > The commit on which it was triggered already includes this fix. So > there must be another bug. Any chance of bisecting it? ___ devel mailing list de...@linuxdriverproject.org http://drive

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify the requested allocation alignment. CMA heap allocates buffers aligned on buffer size page order. Sometimes, the alignment requirement is less restrictive. In such cases, providing specif

Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix

2018-02-12 Thread Dan Carpenter
On Mon, Feb 12, 2018 at 08:05:22PM +0530, Himanshu Jha wrote: > But these should be done when we have *more* instances. > > For eg: > I added a tab space in function static int adis16201_read_raw() argument > to match open parentheses in this patch. But I also added tabs while > removing and addi

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:42 PM, Laura Abbott wrote: > On 02/10/2018 02:17 AM, Alexey Skidanov wrote: >> Current ion defined allocation ioctl doesn't allow to specify the >> requested >> allocation alignment. CMA heap allocates buffers aligned on buffer size >> page order. >> >> Sometimes, the alignment r

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 08:30 PM, Laura Abbott wrote: > On 02/10/2018 01:43 AM, Alexey Skidanov wrote: >> Hi, >> >> Current ion kernel mapping implementation uses vmap() to map previously >> allocated buffers into kernel virtual address space. On 32 bit >> platforms, vmap() might fail on large enough buffe

Re: [PATCH 2/4] staging: iio: accel: Remove unnecessary comments and add suitable suffix

2018-02-12 Thread Himanshu Jha
On Mon, Feb 12, 2018 at 05:57:31PM +0300, Dan Carpenter wrote: > On Mon, Feb 12, 2018 at 08:05:22PM +0530, Himanshu Jha wrote: > > But these should be done when we have *more* instances. > > > > For eg: > > I added a tab space in function static int adis16201_read_raw() argument > > to match open

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/12/2018 11:11 AM, Alexey Skidanov wrote: On 02/12/2018 08:42 PM, Laura Abbott wrote: On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify the requested allocation alignment. CMA heap allocates buffers aligned on buffer size page ord

Re: ion kernel mapping implementation

2018-02-12 Thread Laura Abbott
On 02/12/2018 11:21 AM, Alexey Skidanov wrote: On 02/12/2018 08:30 PM, Laura Abbott wrote: On 02/10/2018 01:43 AM, Alexey Skidanov wrote: Hi, Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32 bit platforms, vmap

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 09:52 PM, Laura Abbott wrote: > On 02/12/2018 11:11 AM, Alexey Skidanov wrote: >> >> On 02/12/2018 08:42 PM, Laura Abbott wrote: >>> On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify the requested allocation a

Re: ion kernel mapping implementation

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:09 PM, Laura Abbott wrote: > On 02/12/2018 11:21 AM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 08:30 PM, Laura Abbott wrote: >>> On 02/10/2018 01:43 AM, Alexey Skidanov wrote: Hi, Current ion kernel mapping implementation uses vmap() to map previously allo

Re: [PATCH] staging: android: ion: Restrict cache maintenance to dma mapped memory

2018-02-12 Thread Laura Abbott
On 02/09/2018 10:21 PM, Liam Mark wrote: The ION begin_cpu_access and end_cpu_access functions use the dma_sync_sg_for_cpu and dma_sync_sg_for_device APIs to perform cache maintenance. Currently it is possible to apply cache maintenance, via the begin_cpu_access and end_cpu_access APIs, to ION b

Re: [PATCH] staging: android: ion: Restrict cache maintenance to dma mapped memory

2018-02-12 Thread Laura Abbott
On 02/09/2018 10:21 PM, Liam Mark wrote: The ION begin_cpu_access and end_cpu_access functions use the dma_sync_sg_for_cpu and dma_sync_sg_for_device APIs to perform cache maintenance. Currently it is possible to apply cache maintenance, via the begin_cpu_access and end_cpu_access APIs, to ION b

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Laura Abbott
On 02/12/2018 12:22 PM, Alexey Skidanov wrote: On 02/12/2018 09:52 PM, Laura Abbott wrote: On 02/12/2018 11:11 AM, Alexey Skidanov wrote: On 02/12/2018 08:42 PM, Laura Abbott wrote: On 02/10/2018 02:17 AM, Alexey Skidanov wrote: Current ion defined allocation ioctl doesn't allow to specify

[PATCH 0/5] mtd: Simplify erase handling

2018-02-12 Thread Boris Brezillon
Hello, This series aims at simplifying erase handling both in MTD drivers and MTD users code. Historically, the erase operation has been designed to be asynchronous, which, in theory, is a good thing since erasing a block usually takes longer that reading/writing to a flash. In practice, all driv

[PATCH 1/5] mtd: Initialize ->fail_addr early in mtd_erase()

2018-02-12 Thread Boris Brezillon
mtd_erase() can return an error before ->fail_addr is initialized to MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning of the function. Signed-off-by: Boris Brezillon --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/m

[PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-12 Thread Boris Brezillon
MTD users are no longer checking erase_info->state to determine if the erase operation failed or succeeded. Moreover, mtd_erase_callback() is now a NOP. We can safely get rid of all mtd_erase_callback() calls and all erase_info->state assignments. While at it, get rid of the erase_info->state fiel

[PATCH 3/5] mtd: Stop assuming mtd_erase() is asynchronous

2018-02-12 Thread Boris Brezillon
None of the mtd->_erase() implementations work in an asynchronous manner, so let's simplify MTD users that call mtd_erase(). All they need to do is check the value returned by mtd_erase() and assume that != 0 means failure. Signed-off-by: Boris Brezillon --- drivers/mtd/devices/bcm47xxsflash.c |

[PATCH 2/5] mtd: Get rid of unused fields in struct erase_info

2018-02-12 Thread Boris Brezillon
Some fields are not used by MTD drivers, users or core code. Moreover, those fields are not documented, so get rid of them to avoid any confusion. Signed-off-by: Boris Brezillon --- include/linux/mtd/mtd.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/

[PATCH 4/5] mtd: Unconditionally update ->fail_addr and ->addr in part_erase()

2018-02-12 Thread Boris Brezillon
->fail_addr and ->addr can be updated no matter the result of parent->_erase(), we just need to remove the code doing the same thing in mtd_erase_callback() to avoid adjusting those fields twice. Note that this can be done because all MTD users have been converted to not pass an erase_info->callba

Re: [PATCH] staging: android: ion: Initialize dma_address of new sg list

2018-02-12 Thread Liam Mark
On Mon, 12 Feb 2018, Dan Carpenter wrote: > On Fri, Feb 09, 2018 at 10:16:56PM -0800, Liam Mark wrote: > > Fix the dup_sg_table function to initialize the dma_address of the new > > sg list entries instead of the source dma_address entries. > > > > Fixes: 17fd283f3870 ("staging: android: ion: Du

Re: [PATCH] staging: android: ion: Add requested allocation alignment

2018-02-12 Thread Alexey Skidanov
On 02/12/2018 10:46 PM, Laura Abbott wrote: > On 02/12/2018 12:22 PM, Alexey Skidanov wrote: >> >> >> On 02/12/2018 09:52 PM, Laura Abbott wrote: >>> On 02/12/2018 11:11 AM, Alexey Skidanov wrote: On 02/12/2018 08:42 PM, Laura Abbott wrote: > On 02/10/2018 02:17 AM, Alexey Skidanov

Re: [PATCH 2/5] mtd: Get rid of unused fields in struct erase_info

2018-02-12 Thread Richard Weinberger
Am Montag, 12. Februar 2018, 22:03:08 CET schrieb Boris Brezillon: > Some fields are not used by MTD drivers, users or core code. Moreover, > those fields are not documented, so get rid of them to avoid any > confusion. > > Signed-off-by: Boris Brezillon > --- > include/linux/mtd/mtd.h | 5 -

Re: [PATCH 1/5] mtd: Initialize ->fail_addr early in mtd_erase()

2018-02-12 Thread Richard Weinberger
Am Montag, 12. Februar 2018, 22:03:07 CET schrieb Boris Brezillon: > mtd_erase() can return an error before ->fail_addr is initialized to > MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning > of the function. > > Signed-off-by: Boris Brezillon > --- > drivers/mtd/mtdcore.c |

Re: [PATCH 3/5] mtd: Stop assuming mtd_erase() is asynchronous

2018-02-12 Thread Richard Weinberger
Am Montag, 12. Februar 2018, 22:03:09 CET schrieb Boris Brezillon: > None of the mtd->_erase() implementations work in an asynchronous manner, > so let's simplify MTD users that call mtd_erase(). All they need to do > is check the value returned by mtd_erase() and assume that != 0 means > failure.

Re: [PATCH 4/5] mtd: Unconditionally update ->fail_addr and ->addr in part_erase()

2018-02-12 Thread Richard Weinberger
Am Montag, 12. Februar 2018, 22:03:10 CET schrieb Boris Brezillon: > ->fail_addr and ->addr can be updated no matter the result of > parent->_erase(), we just need to remove the code doing the same thing > in mtd_erase_callback() to avoid adjusting those fields twice. > > Note that this can be don

usleep_range without a range

2018-02-12 Thread Joe Perches
scheduling can generally be better when these values are not identical. Perhaps these ranges should be expanded. $ git grep -P -n "usleep_range\s*\(\s*([\w\.\>\-]+)\s*,\s*\1\s*\)" drivers/clk/ux500/clk-sysctrl.c:45: usleep_range(clk->enable_delay_us, clk->enable_delay_us); drivers/cp

Re: [PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-12 Thread Richard Weinberger
Am Montag, 12. Februar 2018, 22:03:11 CET schrieb Boris Brezillon: > MTD users are no longer checking erase_info->state to determine if the > erase operation failed or succeeded. Moreover, mtd_erase_callback() is > now a NOP. > > We can safely get rid of all mtd_erase_callback() calls and all > er

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Philippe Ombredanne
On Mon, Feb 12, 2018 at 3:37 PM, Himanshu Jha wrote: > On Mon, Feb 12, 2018 at 03:10:56PM +0100, Philippe Ombredanne wrote: >> On Mon, Feb 12, 2018 at 12:54 PM, Himanshu Jha >> wrote: >> > Move the adis16201 driver out of staging directory and merge to the >> > mainline IIO directory. >> > >> > S

[PATCH] staging: android: ion: Change dma_buf_kmap()/dma_buf_kmap_atomic() implementation

2018-02-12 Thread Alexey Skidanov
Current ion kernel mapping implementation uses vmap() to map previously allocated buffers into kernel virtual address space. On 32-bit platforms, vmap() might fail on large enough buffers due to the limited available vmalloc space. dma_buf_kmap() should guarantee that only one page is mapped at a

[PATCH] staging: rtl8723bs: make 'myid' function to follow kernel coding rules

2018-02-12 Thread Maciek Fijalkowski
Checkpatch.pl produced errors regarding inline keyword placement and parenthesis around returned value in 'myid'. Place inline after static keyword and remove mentioned parenthesis. Signed-off-by: Maciek Fijalkowski --- drivers/staging/rtl8723bs/include/drv_types.h | 4 ++-- 1 file changed, 2 in

Re: [PATCH] staging: android: ion: Restrict cache maintenance to dma mapped memory

2018-02-12 Thread Liam Mark
On Mon, 12 Feb 2018, Laura Abbott wrote: > On 02/09/2018 10:21 PM, Liam Mark wrote: > > The ION begin_cpu_access and end_cpu_access functions use the > > dma_sync_sg_for_cpu and dma_sync_sg_for_device APIs to perform cache > > maintenance. > > > > Currently it is possible to apply cache maintenan

staging: android: ion: potential coherency issue

2018-02-12 Thread Alexey Skidanov
Hello, Correct me if I'm wrong, but there is no user space interface, similar to the dma_buf_start_cpu_access()/dma_buf_end_cpu_access() to handle IO coherency. That is, on the platforms, where the SW is responsible for IO coherency handling, the following sequences: - write to the buffer - DMA re

Re: [PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-12 Thread Miquel Raynal
Hi Boris, Just a few comments about the form. Otherwise: Reviewed-by: Miquel Raynal > diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c > index 555b94406e0b..3d6c8ffd351f 100644 > --- a/drivers/mtd/devices/lart.c > +++ b/drivers/mtd/devices/lart.c > @@ -415,7 +415,6 @@ stati

Re: KASAN: use-after-free Read in remove_wait_queue

2018-02-12 Thread Martijn Coenen
On Mon, Feb 12, 2018 at 7:31 PM, Al Viro wrote: > Any chance of bisecting it? Perhaps my fix introduced another (related) problem, I'm looking into it. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/l