[PATCH] android/binder: Replace vm_insert_page with vmf_insert_page

2018-09-20 Thread Souptick Joarder
There is a plan to replace vm_insert_page with new API vmf_insert_page. As part of it, converting vm_insert_page to use vmf_insert_page. Signed-off-by: Souptick Joarder --- drivers/android/binder_alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/android

Re: [PATCH] drivers/android/binder.c: Remove duplicate header

2018-11-09 Thread Souptick Joarder
On Fri, Nov 9, 2018 at 8:17 PM Greg KH wrote: > > On Fri, Nov 09, 2018 at 10:40:14PM +0800, kbuild test robot wrote: > > Hi Brajeswar, > > > > Thank you for the patch! Yet something to improve: > > > > [auto build test ERROR on staging/staging-testing] > > [also build test ERROR on v4.20-rc1 next-

[PATCH] media: atomisp: Fixed error handling path

2020-09-27 Thread Souptick Joarder
Fix this by passing the page_nr to free_user_pages(). If page_nr > 0 pages will be unpinned based on bo->mem_type. This will also take care of non error handling path. Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory allocation") Signed-off-by: Souptick Joarder C

Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-28 Thread Souptick Joarder
Hi Dan, On Mon, Sep 28, 2020 at 2:08 PM Dan Carpenter wrote: > > On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote: > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > or get_user_pages_fast() will be called. However, these API might

[PATCH v2] media: atomisp: Fixed error handling path

2020-11-03 Thread Souptick Joarder
Fix this by passing the page_nr to free_user_pages(). If page_nr > 0 pages will be unpinned based on bo->mem_type. This will also take care of non error handling path. Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory allocation") Signed-off-by: Souptick J

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-11-18 Thread Souptick Joarder
On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder wrote: > > Inside alloc_user_pages() based on flag value either pin_user_pages() > or get_user_pages_fast() will be called. However, these API might fail. > > But free_user_pages() called in error handling path doesn't bother

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-12-08 Thread Souptick Joarder
On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder wrote: > > > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > or get_user_pages_fast() will be called. However, these API might fail. >

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-12-28 Thread Souptick Joarder
On Wed, Dec 9, 2020 at 1:18 AM Souptick Joarder wrote: > > On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > > > On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder > > wrote: > > > > > > Inside alloc_user_pages() based on flag value either pin

Re: [PATCH] staging/android/vsoc: Remove duplicate header

2019-01-14 Thread Souptick Joarder
On Wed, Jan 9, 2019 at 8:56 PM Brajeswar Ghosh wrote: > > Remove linux/mutex.h.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Souptick Joarder > --- > drivers/staging/android/vsoc.c | 1 - > 1 file changed, 1 deletion(-) > > d

[PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT ioctl. This functionality has been superseded by the futex and is there for legacy reasons. Signed-off-by: Souptick Joarder --- drivers/staging/android/uapi/vsoc_shm.h | 7 --- drivers/staging/android/vsoc.c | 5

Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
On Mon, Feb 11, 2019 at 9:10 PM Greg KH wrote: > > On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote: > > As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT > > ioctl. This functionality has been superseded by the futex and is > >

Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
On Mon, Feb 11, 2019 at 9:27 PM Greg KH wrote: > > On Mon, Feb 11, 2019 at 09:21:19PM +0530, Souptick Joarder wrote: > > On Mon, Feb 11, 2019 at 9:10 PM Greg KH wrote: > > > > > > On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote: > > &g

Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-12 Thread Souptick Joarder
On Tue, Feb 12, 2019 at 12:28 AM Alistair Strachan wrote: > > On Mon, Feb 11, 2019 at 9:22 AM Todd Kjos wrote: > > > > +Alistair Strachan > > > > On Mon, Feb 11, 2019 at 9:11 AM Greg KH wrote: > > > > > > On Mon, Feb 11, 2019 at 10:15:18PM +0530

Re: [RESEND PATCH 3/7] mm/gup: Change GUP fast to use flags rather than a write 'bool'

2019-02-20 Thread Souptick Joarder
Hi Ira, On Wed, Feb 20, 2019 at 11:01 AM wrote: > > From: Ira Weiny > > To facilitate additional options to get_user_pages_fast() change the > singular write parameter to be gup_flags. > > This patch does not change any functionality. New functionality will > follow in subsequent patches. > > S

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread Souptick Joarder
On Wed, Nov 29, 2017 at 4:00 PM, Souptick Joarder wrote: > On Wed, Nov 29, 2017 at 6:25 AM, David Daney wrote: >> From: Carlos Munoz >> >> The Cavium OCTEON cn78xx and cn73xx SoCs have network packet I/O >> hardware that is significantly different from previous g

Re: [PATCH v4 7/8] netdev: octeon-ethernet: Add Cavium Octeon III support.

2017-11-29 Thread Souptick Joarder
Hi David, Dan, On Thu, Nov 30, 2017 at 12:50 AM, David Daney wrote: > On 11/29/2017 08:07 AM, Souptick Joarder wrote: >> >> On Wed, Nov 29, 2017 at 4:00 PM, Souptick Joarder >> wrote: >>> >>> On Wed, Nov 29, 2017 at 6:25 AM, David Daney >>> wr

[PATCH] android: binder: Change return type to vm_fault_t

2018-04-16 Thread Souptick Joarder
-> 1c8f422059ae5da07db7406ab916203f9417e396 Signed-off-by: Souptick Joarder --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 15e3d3c..65be4ec 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binde

[PATCH] staging: lustre: Change return type to vm_fault_t

2018-04-21 Thread Souptick Joarder
Signed-off-by: Souptick Joarder --- drivers/staging/lustre/lustre/llite/llite_mmap.c | 29 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index c0533bd..6aaf

Re: [PATCH] android: binder: Change return type to vm_fault_t

2018-04-23 Thread Souptick Joarder
On Mon, Apr 23, 2018 at 2:48 PM, Greg KH wrote: > On Mon, Apr 16, 2018 at 08:41:21PM +0530, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler >> in struct vm_operations_struct. For now, this is >> just documenting that the function returns a >>

[PATCH v2] android: binder: Change return type to vm_fault_t

2018-04-23 Thread Souptick Joarder
: change return type to vm_fault_t") Signed-off-by: Souptick Joarder --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 15e3d3c..65be4ec 100644 --- a/drivers/android/binder.c +++ b/dr

Re: [PATCH] staging: lustre: Change return type to vm_fault_t

2018-04-23 Thread Souptick Joarder
On Sun, Apr 22, 2018 at 8:50 AM, Matthew Wilcox wrote: > On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: >> @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) >> * \retval VM_FAULT_ERROR on general error >> * \retval NOPAGE_OOM not have me

Re: [PATCH] staging: lustre: Change return type to vm_fault_t

2018-04-23 Thread Souptick Joarder
On Mon, Apr 23, 2018 at 11:05 PM, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 10:12:30PM +0530, Souptick Joarder wrote: >> On Sun, Apr 22, 2018 at 8:50 AM, Matthew Wilcox wrote: >> > On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: >> >> @@ -261

[PATCH v2] staging: lustre: Change return type to vm_fault_t

2018-05-16 Thread Souptick Joarder
Signed-off-by: Souptick Joarder --- v2: updated the change log drivers/staging/lustre/lustre/llite/llite_mmap.c | 35 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/ll

Re: [PATCH v2] staging: lustre: Change return type to vm_fault_t

2018-05-21 Thread Souptick Joarder
On Sun, May 20, 2018 at 6:12 PM, Greg KH wrote: > On Thu, May 17, 2018 at 12:27:11AM +0530, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler. For >> now, this is just documenting that the function returns >> a VM_FAULT value rather than an errn

[PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-05-21 Thread Souptick Joarder
_t") was added in 4.17-rc1 to introduce the new typedef vm_fault_t. Currently we are making change to all drivers to return vm_fault_t for page fault handlers. As part of that lustre driver is also getting changed to return vm_fault_t type. Signed-off-by: Souptick Joarder --- v2: updated the c

Re: [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-11 Thread Souptick Joarder
On Mon, May 21, 2018 at 11:39 PM, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct t

Re: [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-12 Thread Souptick Joarder
On Tue, Jun 12, 2018 at 2:37 AM, Greg KH wrote: > On Tue, Jun 12, 2018 at 02:30:27AM +0530, Souptick Joarder wrote: >> > > >> > > If no further comment, we would like to get this patch in 4.18-rc-X. >> > >> > Why? Is it a regression fix? That's

Re: [lustre-devel] [PATCH v3] staging: lustre: Change return type to vm_fault_t

2018-06-14 Thread Souptick Joarder
On Thu, Jun 14, 2018 at 12:59 PM, NeilBrown wrote: > On Tue, Jun 12 2018, Souptick Joarder wrote: > >> On 12-Jun-2018 2:21 AM, "Greg KH" wrote: >>> >>> On Tue, Jun 12, 2018 at 02:00:47AM +0530, Souptick Joarder wrote: >>> > On Mon, May 21, 2

[RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-05 Thread Souptick Joarder
{get|pin}_user_pages_fast() will have 2 return values -errno & no of pinned pages. Update all the callers which deals with return value 0 accordingly. Signed-off-by: Souptick Joarder --- arch/ia64/kernel/err_inject.c | 2 +- drivers/platform/goldfish/goldfish_pipe.c | 2 +- drivers/st

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-05 Thread Souptick Joarder
On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > On 2020-05-05 12:14, Souptick Joarder wrote: > > Currently {get|pin}_user_pages_fast() have 3 return value 0, -errno > > and no of pinned pages. The only case where these two functions will > > return 0, is for nr_p

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Souptick Joarder
On Wed, May 6, 2020 at 3:36 PM Jan Kara wrote: > > On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > > On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > > > > > On 2020-05-05 12:14, Souptick Joarder wrote: > > > > Currently {get|pin}_user_

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Souptick Joarder
On Wed, May 6, 2020 at 6:29 PM Jan Kara wrote: > > On Wed 06-05-20 17:51:39, Souptick Joarder wrote: > > On Wed, May 6, 2020 at 3:36 PM Jan Kara wrote: > > > > > > On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > > > > On Wed, May 6, 2020 at 1:08 AM J

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-07 Thread Souptick Joarder
On Thu, May 7, 2020 at 3:43 PM Jan Kara wrote: > > On Wed 06-05-20 21:38:40, Souptick Joarder wrote: > > On Wed, May 6, 2020 at 6:29 PM Jan Kara wrote: > > > > > > On Wed 06-05-20 17:51:39, Souptick Joarder wrote: > > > > On Wed, May 6, 2020 at 3:36 PM J

Re: [PATCH 17/20] staging: wilc1000: fix return type of host_int_get_ipaddress

2015-12-30 Thread Souptick Joarder
Hi Lim, On Wed, Dec 30, 2015 at 5:45 PM, Chaehyun Lim wrote: > This patch changes return type of host_int_get_ipaddress from s32 to > int. The result variable gets return value from wilc_mq_send that has > data type of int. It should be changed return type of this function as > well as data type

Re: [PATCH v2 1/2] staging: wilc1000: fix always return 0 error

2015-12-30 Thread Souptick Joarder
HI Glen, On Thu, Dec 24, 2015 at 11:32 AM, Glen Lee wrote: > This patch fixes a bug that return always 0 so it fails every time. > > Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of > io_init") > Signed-off-by: Glen Lee > --- > Changes in v2: separate v1 patch into two p

Re: [PATCH] rtlwifi: Change long delays to sleeps

2016-02-15 Thread Souptick Joarder
On Tue, Feb 16, 2016 at 3:42 AM, Larry Finger wrote: > Routine rtl_addr_delay() uses delay statements in code that can > sleep. To improve system responsiveness, the various delay statements > are changed. > > In addition, routines rtl_rfreg_delay() and rtl_bb_delay() are > rewritten to use the co

Re: [PATCH] staging: rtl8712: Free memory and return failure when kmalloc fails

2016-10-23 Thread Souptick Joarder
Hi Larry, Greg, On Thu, Oct 20, 2016 at 12:29 PM, Souptick Joarder wrote: > This patch is added to free memory and return failure when kmalloc fails > > Signed-off-by: Souptick joarder > --- > drivers/staging/rtl8712/os_intfs.c | 3 ++- > drivers/staging/rtl8712/

Re: [PATCH] staging: rtl8712: Free memory and return failure when kmalloc fails

2016-10-25 Thread Souptick Joarder
Hi Greg, On Tue, Oct 25, 2016 at 2:33 PM, Greg KH wrote: > On Thu, Oct 20, 2016 at 12:29:33PM +0530, Souptick Joarder wrote: >> This patch is added to free memory and return failure when kmalloc fails > > I'm sorry, but I can not parse that sentance. Can you rephrase this a

Re: [PATCH] staging: rtl8712: Free memory and return failure when kmalloc fails

2016-10-25 Thread Souptick Joarder
On Tue, Oct 25, 2016 at 11:41 PM, Greg KH wrote: > On Tue, Oct 25, 2016 at 10:06:48PM +0530, Souptick Joarder wrote: >> Hi Greg, >> >> >> On Tue, Oct 25, 2016 at 2:33 PM, Greg KH wrote: >> > On Thu, Oct 20, 2016 at 12:29:33PM +0530, Souptick Joarder wrot

[PATCH] staging : rtl8712: Free memory when kmalloc fails

2016-10-26 Thread Souptick Joarder
-off-by: Souptick joarder --- drivers/staging/rtl8712/rtl871x_cmd.c | 5 - drivers/staging/rtl8712/rtl871x_xmit.c | 5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index b7ee5e6..04638f1

Re: [PATCH] staging : rtl8712: Free memory when kmalloc fails

2016-10-26 Thread Souptick Joarder
On Wed, Oct 26, 2016 at 12:39 PM, Greg KH wrote: > On Wed, Oct 26, 2016 at 12:30:26PM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated memory >> when kmalloc fails. Else it may lead to memory leakage. >> In

[PATCH] staging :rtl8712: Free memory when kmalloc fails

2016-10-26 Thread Souptick Joarder
-off-by: Souptick joarder --- drivers/staging/rtl8712/rtl871x_cmd.c | 5 - drivers/staging/rtl8712/rtl871x_xmit.c | 5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index b7ee5e6..04638f1

Re: [PATCH] staging :rtl8712: Free memory when kmalloc fails

2016-10-27 Thread Souptick Joarder
On Thu, Oct 27, 2016 at 11:20 AM, Greg KH wrote: > On Thu, Oct 27, 2016 at 11:10:09AM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated memory >> when kmalloc fails. Else it may lead to memory leakage. >> In

[PATCH v2] staging : rtl8712: Free memory when kmalloc fails

2016-10-27 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails.Else it may lead to memory leakage.In _init_cmd_priv() and _r8712_init_xmit_priv(),in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder

Re: [PATCH v2] staging : rtl8712: Free memory when kmalloc fails

2016-10-27 Thread Souptick Joarder
On Thu, Oct 27, 2016 at 6:40 PM, Greg KH wrote: > On Thu, Oct 27, 2016 at 01:46:13PM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated memory >> when kmalloc fails.Else it may lead to memory leakage.In _init_cm

[PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-27 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder

Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
On Sun, Oct 30, 2016 at 8:41 PM, Greg KH wrote: > On Fri, Oct 28, 2016 at 10:37:53AM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated memory >> when kmalloc fails. Else it may lead to memory leakage. In _init_cm

[PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder

Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
H Greg, On Mon, Oct 31, 2016 at 3:37 PM, Greg KH wrote: > On Mon, Oct 31, 2016 at 02:32:39PM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated >> memory when kmalloc fails. Else it may lead to memory leakage. In >>

[PATCH v4] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder

[PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-27 Thread Souptick Joarder
[2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-28 Thread Souptick Joarder
On Thu, May 28, 2020 at 4:34 PM Dan Carpenter wrote: > > On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: > > This code was using get_user_pages_fast(), in a "Case 2" scenario > > (DMA/RDMA), using the categorization from [1]. That means that

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-28 Thread Souptick Joarder
On Fri, May 29, 2020 at 11:46 AM Souptick Joarder wrote: > > On Thu, May 28, 2020 at 4:34 PM Dan Carpenter > wrote: > > > > On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: > > > This code was using get_user_pages_fast(), in a "Case 2&qu

[PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-31 Thread Souptick Joarder
rticles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter --- Hi, I'm compile tested this, but unable to run-time test, so any testing help is much appriciated. drivers/staging/gasket/gasket_page_table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletio

[PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-05-31 Thread Souptick Joarder
d it as part of this patch. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard --- Hi, I'm compile tested this, but unable to run-time test, so any t

[PATCH] staging: vc04_services: Convert get_user_pages*() --> pin_user_pages*()

2020-06-02 Thread Souptick Joarder
rticles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard --- Hi, I'm compile tested this, but unable to run-time test, so any testing help is much appriciated. .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 16 +--- 1 file changed, 5 insertions(+), 11 delet

Re: [PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-08 Thread Souptick Joarder
On Mon, Jun 1, 2020 at 7:15 AM John Hubbard wrote: > > On 2020-05-31 10:51, Souptick Joarder wrote: > > In 2019, we introduced pin_user_pages*() and now we are converting > > get_user_pages*() to the new API as appropriate. [1] & [2] could > > be referred for mo

Re: [PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-08 Thread Souptick Joarder
On Tue, Jun 9, 2020 at 12:47 AM Dan Carpenter wrote: > > On Tue, Jun 09, 2020 at 12:31:42AM +0530, Souptick Joarder wrote: > > > > @@ -189,10 +192,9 @@ static int kpc_dma_transfer(struct > > > > dev_private_data *priv, > > > > sg_free_t

[PATCH 1/4] staging: kpc2000: Unpin partial pinned pages

2020-06-16 Thread Souptick Joarder
There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c

[PATCH 0/4] staging: kpc2000: kpc_dma: Few clean up and Convert to pin_user_pages()

2020-06-16 Thread Souptick Joarder
This series contains few clean up, minor bug fixes and Convert get_user_pages() to pin_user_pages(). I'm compile tested this, but unable to run-time test, so any testing help is much appriciated. Souptick Joarder (4): staging: kpc2000: Unpin partial pinned pages staging: kpc2000: kp

[PATCH 4/4] staging: kpc2000: kpc_dma: Remove excess goto statement

2020-06-16 Thread Souptick Joarder
As 3 goto level referring to same common code, those can be accomodated with a single goto level and renameing it to unpin_user_pages. Signed-off-by: Souptick Joarder Cc: Dan Carpenter Cc: John Hubbard --- drivers/staging/kpc2000/kpc_dma/fileops.c | 21 + 1 file changed, 9

[PATCH 3/4] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-16 Thread Souptick Joarder
rticles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/s

[PATCH 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-06-16 Thread Souptick Joarder
First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested

[PATCH v2] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-06-16 Thread Souptick Joarder
rticles/807108/ Signed-off-by: Souptick Joarder Acked-by: Dan Carpenter Cc: John Hubbard Cc: Dan Carpenter --- Hi, I'm compile tested this, but unable to run-time test, so any testing help is much appriciated. v2: Added review tag. drivers/staging/gasket/gasket_page_table.c

Re: [PATCH 1/4] staging: kpc2000: Unpin partial pinned pages

2020-06-17 Thread Souptick Joarder
On Wed, Jun 17, 2020 at 4:43 PM Dan Carpenter wrote: > > On Wed, Jun 17, 2020 at 07:57:20AM +0530, Souptick Joarder wrote: > > There is a bug, when get_user_pages() failed but partially pinned > > pages are not unpinned. Fixed it. > > > > Also, int is more appro

Re: [PATCH 1/4] staging: kpc2000: Unpin partial pinned pages

2020-06-17 Thread Souptick Joarder
On Wed, Jun 17, 2020 at 11:29 PM Dan Carpenter wrote: > > On Wed, Jun 17, 2020 at 11:13:32PM +0530, Souptick Joarder wrote: > > On Wed, Jun 17, 2020 at 4:43 PM Dan Carpenter > > wrote: > > > > > > On Wed, Jun 17, 2020 at 07:57:20AM +0530, Souptick Joarder

Re: [PATCH 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-06-27 Thread Souptick Joarder
On Wed, Jun 17, 2020 at 7:50 AM Souptick Joarder wrote: > > First, convert set_page_dirty() to set_page_dirty_lock() > > Second, there is an interval in there after set_page_dirty() and > before put_page(), in which the device could be running and setting > pages dirty. Moving s

[PATCH v2 3/4] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-30 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/k

[PATCH v2 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-06-30 Thread Souptick Joarder
First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested

[PATCH v2 0/4] staging: kpc2000: kpc_dma: Few clean up and Convert to pin_user_pages()

2020-06-30 Thread Souptick Joarder
pages and changed the other patches in series accordingly. Minor update in change logs. Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Souptick Joarder (4): staging: kpc2000: kpc_dma: Unpin partial pinned pages staging: kpc2000: kpc_dma: Convert set_

[PATCH v2 4/4] staging: kpc2000: kpc_dma: Remove additional goto statements

2020-06-30 Thread Souptick Joarder
As 3 goto level referring to same common code, those can be accomodated with a single goto level and renameing it to unpin_pages. Set the -ERRNO when returning partial mapped pages in more appropriate place. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan

[PATCH v2 1/4] staging: kpc2000: kpc_dma: Unpin partial pinned pages

2020-06-30 Thread Souptick Joarder
There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned and positive numbers are returned instead of -ERRNO. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter Cc: Bharath

[PATCH v3 0/4] staging: kpc2000: kpc_dma: Few clean up and Convert to pin_user_pages()

2020-06-30 Thread Souptick Joarder
pages and changed the other patches in series accordingly. Minor update in change logs. v3: Address review comment to invoke the right goto level when allocation failed in patch[4/4]. Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Souptick Joarder (4): stagin

[PATCH v3 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-06-30 Thread Souptick Joarder
First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested

[PATCH v3 1/4] staging: kpc2000: kpc_dma: Unpin partial pinned pages

2020-06-30 Thread Souptick Joarder
There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned and positive numbers are returned instead of -ERRNO. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter Cc: Bharath

[PATCH v3 3/4] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-30 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/k

[PATCH v3 4/4] staging: kpc2000: kpc_dma: Remove additional goto statements

2020-06-30 Thread Souptick Joarder
corrected now. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b