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

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

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()

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

2016-10-26 Thread Souptick Joarder
-off-by: Souptick joarder <jrdr.li...@gmail.com> --- 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

[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] staging :rtl8712: Free memory when kmalloc fails

2016-10-27 Thread Souptick Joarder
On Thu, Oct 27, 2016 at 11:20 AM, Greg KH <gre...@linuxfoundation.org> 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 l

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 <gre...@linuxfoundation.org> 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 leaka

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 <jrdr.li...@gmail.com> wrote: > This patch is added to free memory and return failure when kmalloc fails > > Signed-off-by: Souptick joarder <jrdr.li...@gmail.com> > --- > drivers/staging/rtl8712/os_int

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 <gre...@linuxfoundation.org> 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 th

[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] staging: rtl8712: Free memory and return failure when kmalloc fails

2016-10-26 Thread Souptick Joarder
On Tue, Oct 25, 2016 at 11:41 PM, Greg KH <gre...@linuxfoundation.org> 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 <gre...@linuxfoundation.org> wrote: >&g

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

2016-10-26 Thread Souptick Joarder
-off-by: Souptick joarder <jrdr.li...@gmail.com> --- 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

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 <gre...@linuxfoundation.org> 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 l

[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
On Sun, Oct 30, 2016 at 8:41 PM, Greg KH <gre...@linuxfoundation.org> 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 l

[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

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 <gre...@linuxfoundation.org> 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 l

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 <jrdr.li...@gmail.com> wrote: > On Wed, Nov 29, 2017 at 6:25 AM, David Daney <david.da...@cavium.com> wrote: >> From: Carlos Munoz <cmu...@cavium.com> >> >> The Cavium OCTEON cn78xx and cn73xx S

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 <dda...@caviumnetworks.com> wrote: > On 11/29/2017 08:07 AM, Souptick Joarder wrote: >> >> On Wed, Nov 29, 2017 at 4:00 PM, Souptick Joarder <jrdr.li...@gmail.com> >> wrote: >>> >&g

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

2018-05-16 Thread Souptick Joarder
Signed-off-by: Souptick Joarder <jrdr.li...@gmail.com> --- 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/driver

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 <gre...@linuxfoundation.org> 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

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

2018-05-21 Thread Souptick Joarder
_fault_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 <jrdr.li...@g

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: >>> >

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 regressio

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

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

2018-04-21 Thread Souptick Joarder
Signed-off-by: Souptick Joarder <jrdr.li...@gmail.com> --- 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/ll

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

2018-04-16 Thread Souptick Joarder
-> 1c8f422059ae5da07db7406ab916203f9417e396 Signed-off-by: Souptick Joarder <jrdr.li...@gmail.com> --- 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/binde

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 <gre...@linuxfoundation.org> 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 documentin

[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 <jrdr.li...@gmail.com> --- 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/and

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 <wi...@infradead.org> 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 >> *

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 <wi...@infradead.org> 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 <wi...@infradead.org> wrote: >> > On Sun, Apr 22, 2018 at 03:47:24AM

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

[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] 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

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

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: [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

[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 > >

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

2020-05-05 Thread Souptick Joarder
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/staging

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-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: [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,

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

2020-05-27 Thread Souptick Joarder
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-by: Soupti

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

2020-05-29 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 t

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

2020-05-29 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

[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 deletions(

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

2020-05-31 Thread Souptick Joarder
ixed 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 testin

[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 deletions(

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_f

[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 | 6

[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: kpc_dma

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 ap

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
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_page_dirty

[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-07-01 Thread Souptick Joarder
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): staging: kpc2000

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

2020-07-01 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 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-07-01 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 4/4] staging: kpc2000: kpc_dma: Remove additional goto statements

2020-07-01 Thread Souptick Joarder
. This is 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

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

2020-07-01 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