Re: [PATCH] staging: rtl8712: Add parenthesis to Macro argument

2019-07-14 Thread kbuild test robot
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.2 next-20190712]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/christianluciano-m-gmail-com/staging-rtl8712-Add-parenthesis-to-Macro-argument/20190714-103146
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/rtl8712/osdep_service.h:31:0,
from drivers/staging/rtl8712/hal_init.c:25:
   drivers/staging/rtl8712/hal_init.c: In function 'chk_fwhdr':
   drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression 
before ')' token
#define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
^
>> drivers/staging/rtl8712/hal_init.c:136:12: note: in expansion of macro 
>> 'FIELD_OFFSET'
 fwhdrsz = FIELD_OFFSET(struct fw_hdr, fwpriv) + pfwhdr->fw_priv_sz;
   ^~~~
   drivers/staging/rtl8712/hal_init.c: In function 'rtl8712_dl_fw':
   drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression 
before ')' token
#define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
^
   drivers/staging/rtl8712/hal_init.c:176:26: note: in expansion of macro 
'FIELD_OFFSET'
  ptr = (u8 *)mappedfw + FIELD_OFFSET(struct fw_hdr, fwpriv) +
 ^~~~
--
   In file included from drivers/staging/rtl8712/osdep_service.h:31:0,
from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:20:
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 
'wpa_set_encryption':
   drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression 
before ')' token
#define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:413:4: note: in expansion of 
>> macro 'FIELD_OFFSET'
   FIELD_OFFSET(struct NDIS_802_11_WEP, KeyMaterial);
   ^~~~
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 
'r8711_wx_set_enc':
   drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression 
before ')' token
#define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
^
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1562:9: note: in expansion of 
macro 'FIELD_OFFSET'
FIELD_OFFSET(struct NDIS_802_11_WEP, KeyMaterial);
^~~~

vim +/FIELD_OFFSET +136 drivers/staging/rtl8712/hal_init.c

359140aaea Ali Bahar  2011-09-04   24  
2865d42c78 Larry Finger   2010-08-20  @25  #include "osdep_service.h"
2865d42c78 Larry Finger   2010-08-20   26  #include "drv_types.h"
16e53729b7 Larry Finger   2010-08-30   27  #include "usb_osintf.h"
2865d42c78 Larry Finger   2010-08-20   28  
2865d42c78 Larry Finger   2010-08-20   29  #define FWBUFF_ALIGN_SZ 512
2865d42c78 Larry Finger   2010-08-20   30  #define MAX_DUMP_FWSZ49152 
/*default = 49152 (48k)*/
2865d42c78 Larry Finger   2010-08-20   31  
8c213fa591 Larry Finger   2012-02-05   32  static void 
rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
2865d42c78 Larry Finger   2010-08-20   33  {
286570fbdf Nishka Dasgupta2019-06-07   34   struct _adapter *adapter = 
context;
8c213fa591 Larry Finger   2012-02-05   35  
286570fbdf Nishka Dasgupta2019-06-07   36   
complete(&adapter->rtl8712_fw_ready);
8c213fa591 Larry Finger   2012-02-05   37   if (!firmware) {
286570fbdf Nishka Dasgupta2019-06-07   38   struct usb_device *udev 
= adapter->dvobjpriv.pusbdev;
286570fbdf Nishka Dasgupta2019-06-07   39   struct usb_interface 
*usb_intf = adapter->pusb_intf;
6a7cbc38ad Sarah Khan 2014-09-24   40  
87a573ada0 Przemo Firszt  2012-12-10   41   dev_err(&udev->dev, 
"r8712u: Firmware request failed\n");
8c213fa591 Larry Finger   2012-02-05   42   usb_put_dev(udev);
286570fbdf Nishka Dasgupta2019-06-07   43   
usb_set_intfdata(usb_intf, NULL);
8c213fa591 Larry Finger   2012-02-05   44   return;
8c213fa

Re: [v3] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Markus Elfring
> This print statement is redundant as kfifo_alloc just calls kmalloc_array
> and without the __GFP_NOWARN flag, already does a dump_stack().

I suggest to omit the word “and” from this sentence.
Will any further wording adjustments become helpful for commit descriptions?


> Changes in v3:
> - fix checkpatch warrning
> ---

Please move such version information below the triple dashes without a typo.

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Keyur Patel
This print statement is redundant as kfifo_alloc just calls kmalloc_array
without the __GFP_NOWARN flag, already does a dump_stack().

Signed-off-by: Keyur Patel 
---
Changes in v3:
- fix checkpatch warning

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int 
channel_id,
spin_lock_init(&c->unlink);
INIT_KFIFO(c->fifo);
retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-   if (retval) {
-   pr_info("failed to alloc channel kfifo");
+   if (retval)
goto err_del_cdev_and_free_channel;
-   }
init_waitqueue_head(&c->wq);
mutex_init(&c->io_mutex);
spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Markus Elfring
> ---
> Changes in v3:

Thanks for your quick response.

I find the change log incomplete (even if corresponding information
can be determined also from public message archives).

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Keyur Patel


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Keyur Patel
I didn't get you. I stiil need to update changelog and send more 
version or not. If you say so, I can send one more.

Thnaks.
On Sun, Jul 14, 2019 at 05:23:34PM +0200, Markus Elfring wrote:
> > ---
> > Changes in v3:
> 
> Thanks for your quick response.
> 
> I find the change log incomplete (even if corresponding information
> can be determined also from public message archives).
> 
> Regards,
> Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails

2019-07-14 Thread Markus Elfring
> I didn't get you. I stiil need to update changelog

I would appreciate the completion of the listing for V2 till V4.
I guess that a message resend could be sufficient for these adjustments.


> and send more version

This could be another opportunity if you would like to improve
the commit description considerably.
How do you think about previous clarification attempts on a topic like
“Delete an error message for a failed memory allocation”?

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] staging: iio: ad7192: create of_device_id array

2019-07-14 Thread Jonathan Cameron
On Fri, 28 Jun 2019 16:49:22 -0300
Bárbara Fernandes  wrote:

> Create list of compatible device ids to be matched with those stated in
> the device tree.
> 
> Signed-off-by: Bárbara Fernandes 
> Signed-off-by: Wilson Sales 
> Co-developed by: Wilson Sales 
> ---
Patch is fine and applied to the togreg branch of iio.git.

Only thing to note is that reviewers and maintainers often have
poor memories (or are jet lagged which is my excuse today!)
so it helps to put a change log here under the ---

Thanks,

Jonathan

>  drivers/staging/iio/adc/ad7192.c | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/staging/iio/adc/ad7192.c 
> b/drivers/staging/iio/adc/ad7192.c
> index 3d74da9d37e7..70118db98d94 100644
> --- a/drivers/staging/iio/adc/ad7192.c
> +++ b/drivers/staging/iio/adc/ad7192.c
> @@ -810,11 +810,23 @@ static const struct spi_device_id ad7192_id[] = {
>   {"ad7195", ID_AD7195},
>   {}
>  };
> +
>  MODULE_DEVICE_TABLE(spi, ad7192_id);
>  
> +static const struct of_device_id ad7192_of_match[] = {
> + { .compatible = "adi,ad7190" },
> + { .compatible = "adi,ad7192" },
> + { .compatible = "adi,ad7193" },
> + { .compatible = "adi,ad7195" },
> + {}
> +};
> +
> +MODULE_DEVICE_TABLE(of, ad7192_of_match);
> +
>  static struct spi_driver ad7192_driver = {
>   .driver = {
>   .name   = "ad7192",
> + .of_match_table = ad7192_of_match,
>   },
>   .probe  = ad7192_probe,
>   .remove = ad7192_remove,

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Keyur Patel
This error message for a failed memory allocation is redundant as 
kfifo_alloc just calls kmalloc_array without the __GFP_NOWARN flag,
already does a dump_stack().

Signed-off-by: Keyur Patel 
---
Changes in v4:
- change subject line
- improve commit description
- fix checkpatch warning

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int 
channel_id,
spin_lock_init(&c->unlink);
INIT_KFIFO(c->fifo);
retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-   if (retval) {
-   pr_info("failed to alloc channel kfifo");
+   if (retval)
goto err_del_cdev_and_free_channel;
-   }
init_waitqueue_head(&c->wq);
mutex_init(&c->io_mutex);
spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Markus Elfring
> ---
> Changes in v4:

I find this change log still incomplete.

You have chosen to adjust the commit message once more.
(Some contributors might be also not satisfied with this variant.)

Such a change requires to increase the corresponding patch version number,
doesn't it?

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Keyur Patel
I think commit message is clear enough to understand why this is needed.
You can send me what should I include in commit description and I will
add and send it again. Otherwise, Greg can comment on this.

Thanks.


On Sun, Jul 14, 2019 at 06:55:30PM +0200, Markus Elfring wrote:
> > ---
> > Changes in v4:
> 
> I find this change log still incomplete.
> 
> You have chosen to adjust the commit message once more.
> (Some contributors might be also not satisfied with this variant.)
> 
> Such a change requires to increase the corresponding patch version number,
> doesn't it?
> 
> Regards,
> Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v4] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Markus Elfring
> I think commit message is clear enough to understand why this is needed.

There are differences to consider between the involved software developers.


> You can send me what should I include in commit description

The clarification should be continued with the number “v5”
in the message subject.


> and I will add and send it again. Otherwise, Greg can comment on this.

Would you like to recheck information sources for the safe description
of the Linux allocation failure report?

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: hal: Remove code valid only for 5GHz

2019-07-14 Thread Hariprasad Kelam
As per TODO ,remove code valid only for 5 GHz(channel > 14).

Signed-off-by: Hariprasad Kelam 
---
 drivers/staging/rtl8723bs/hal/hal_com.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 638b12a..eddd56a 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -152,10 +152,7 @@ bool HAL_IsLegalChannel(struct adapter *Adapter, u32 
Channel)
 {
bool bLegalChannel = true;
 
-   if (Channel > 14) {
-   bLegalChannel = false;
-   DBG_871X("Channel > 14 but wireless_mode do not support 5G\n");
-   } else if ((Channel <= 14) && (Channel >= 1)) {
+   if ((Channel <= 14) && (Channel >= 1)) {
if (IsSupported24G(Adapter->registrypriv.wireless_mode) == 
false) {
bLegalChannel = false;
DBG_871X("(Channel <= 14) && (Channel >= 1) but 
wireless_mode do not support 2.4G\n");
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Keyur Patel
The kfifo_alloc() failure generates enough information and doesn't need 
to be accompanied by another error statement.

Signed-off-by: Keyur Patel 
---
Changes in v5:
- change subject line
- simplify commit description
- fix checkpatch warning
- removed braces around if

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int 
channel_id,
spin_lock_init(&c->unlink);
INIT_KFIFO(c->fifo);
retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-   if (retval) {
-   pr_info("failed to alloc channel kfifo");
+   if (retval)
goto err_del_cdev_and_free_channel;
-   }
init_waitqueue_head(&c->wq);
mutex_init(&c->io_mutex);
spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: core: Remove code valid only for 5GHz

2019-07-14 Thread Hariprasad Kelam
As per TODO ,remove code valid only for 5 GHz(channel > 14).

Signed-off-by: Hariprasad Kelam 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 4285844..967da71 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -295,11 +295,7 @@ static void init_mlme_ext_priv_value(struct adapter 
*padapter)
 
init_mlme_default_rate_set(padapter);
 
-   if (pmlmeext->cur_channel > 14)
-   pmlmeext->tx_rate = IEEE80211_OFDM_RATE_6MB;
-   else
-   pmlmeext->tx_rate = IEEE80211_CCK_RATE_1MB;
-
+   pmlmeext->tx_rate = IEEE80211_CCK_RATE_1MB;
pmlmeext->sitesurvey_res.state = SCAN_DISABLE;
pmlmeext->sitesurvey_res.channel_idx = 0;
pmlmeext->sitesurvey_res.bss_cnt = 0;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: os_dep: Remove code valid only for 5GHz

2019-07-14 Thread Hariprasad Kelam
As per TODO ,remove code valid only for 5 GHz(channel > 14).

Signed-off-by: Hariprasad Kelam 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 544e799..18d61e5 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -239,9 +239,6 @@ static void loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
registry_par->channel = (u8)rtw_channel;
registry_par->wireless_mode = (u8)rtw_wireless_mode;
 
-   if (registry_par->channel > 14)
-   registry_par->channel = 1;
-
registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
registry_par->vcs_type = (u8)rtw_vcs_type;
registry_par->rts_thresh = (u16)rtw_rts_thresh;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [v5] staging: most: Delete an error message for a failed memory allocation

2019-07-14 Thread Markus Elfring
> The kfifo_alloc() failure generates enough information and doesn't need
> to be accompanied by another error statement.

I am curious how the acceptance will evolve for this variant of
another different commit description according to a known software
transformation pattern.


> ---
> Changes in v5:

The subsequent listing should usually be split between V2 till V5
for such a patch change log.

Regards,
Markus
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 00/24] erofs: promote erofs from staging

2019-07-14 Thread Pavel Machek
On Thu 2019-07-11 22:57:31, Gao Xiang wrote:
> Changelog from v1:
>  o resend the whole filesystem into a patchset suggested by Greg;
>  o code is more cleaner, especially for decompression frontend.
> 
> --8<--
> 
> Hi,
> 
> EROFS file system has been in Linux-staging for about a year.
> It has been proved to be stable enough to move out of staging
> by 10+ millions of HUAWEI Android mobile phones on the market
> from EMUI 9.0.1, and it was promoted as one of the key features
> of EMUI 9.1 [1], including P30(pro).

Ok, maybe it is ready to be moved to kernel proper, but as git can
do moves, would it be better to do it as one commit?

Separate patches are still better for review, I guess.
Pavel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] mm/gup: Use put_user_page*() instead of put_page*()

2019-07-14 Thread Bharath Vedartham
This patch converts all call sites of get_user_pages
to use put_user_page*() instead of put_page*() functions to
release reference to gup pinned pages.

This is a bunch of trivial conversions which is a part of an effort
by John Hubbard to solve issues with gup pinned pages and 
filesystem writeback.

The issue is more clearly described in John Hubbard's patch[1] where
put_user_page*() functions are introduced.

Currently put_user_page*() simply does put_page but future implementations
look to change that once treewide change of put_page callsites to 
put_user_page*() is finished.

The lwn article describing the issue with gup pinned pages and filesystem 
writeback [2].

This patch has been tested by building and booting the kernel as I don't
have the required hardware to test the device drivers.

I did not modify gpu/drm drivers which use release_pages instead of
put_page() to release reference of gup pinned pages as I am not clear
whether release_pages and put_page are interchangable. 

[1] https://lkml.org/lkml/2019/3/26/1396

[2] https://lwn.net/Articles/784574/

Signed-off-by: Bharath Vedartham 
---
 drivers/media/v4l2-core/videobuf-dma-sg.c | 3 +--
 drivers/misc/sgi-gru/grufault.c   | 2 +-
 drivers/staging/kpc2000/kpc_dma/fileops.c | 4 +---
 drivers/vfio/vfio_iommu_type1.c   | 2 +-
 fs/io_uring.c | 7 +++
 mm/gup_benchmark.c| 6 +-
 net/xdp/xdp_umem.c| 7 +--
 7 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c 
b/drivers/media/v4l2-core/videobuf-dma-sg.c
index 66a6c6c..d6eeb43 100644
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
@@ -349,8 +349,7 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma)
BUG_ON(dma->sglen);
 
if (dma->pages) {
-   for (i = 0; i < dma->nr_pages; i++)
-   put_page(dma->pages[i]);
+   put_user_pages(dma->pages, dma->nr_pages);
kfree(dma->pages);
dma->pages = NULL;
}
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 4b713a8..61b3447 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -188,7 +188,7 @@ static int non_atomic_pte_lookup(struct vm_area_struct *vma,
if (get_user_pages(vaddr, 1, write ? FOLL_WRITE : 0, &page, NULL) <= 0)
return -EFAULT;
*paddr = page_to_phys(page);
-   put_page(page);
+   put_user_page(page);
return 0;
 }
 
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c 
b/drivers/staging/kpc2000/kpc_dma/fileops.c
index 6166587..26dceed 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -198,9 +198,7 @@ int  kpc_dma_transfer(struct dev_private_data *priv, struct 
kiocb *kcb, unsigned
sg_free_table(&acd->sgt);
  err_dma_map_sg:
  err_alloc_sg_table:
-   for (i = 0 ; i < acd->page_count ; i++){
-   put_page(acd->user_pages[i]);
-   }
+   put_user_pages(acd->user_pages, acd->page_count);
  err_get_user_pages:
kfree(acd->user_pages);
  err_alloc_userpages:
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index add34ad..c491524 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@ -369,7 +369,7 @@ static int vaddr_get_pfn(struct mm_struct *mm, unsigned 
long vaddr,
 */
if (ret > 0 && vma_is_fsdax(vmas[0])) {
ret = -EOPNOTSUPP;
-   put_page(page[0]);
+   put_user_page(page[0]);
}
}
up_read(&mm->mmap_sem);
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 4ef62a4..b4a4549 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2694,10 +2694,9 @@ static int io_sqe_buffer_register(struct io_ring_ctx 
*ctx, void __user *arg,
 * if we did partial map, or found file backed vmas,
 * release any pages we did get
 */
-   if (pret > 0) {
-   for (j = 0; j < pret; j++)
-   put_page(pages[j]);
-   }
+   if (pret > 0)
+   put_user_pages(pages, pret);
+
if (ctx->account_mem)
io_unaccount_mem(ctx->user, nr_pages);
kvfree(imu->bvec);
diff --git a/mm/gup_benchmark.c b/mm/gup_benchmark.c
index 7dd602d..15fc7a2 100644
--- a/mm/gup_benchmark.c
+++ b/mm/gup_benchmark.c
@@ -76,11 +76,7 @@ static int __gup_benchmark_ioctl(unsigned int cmd,
gup->size = addr - gup->addr;
 
start_time = ktime_get();
-   for (i = 0; i < nr_pages; i++) {
-   if (!pages[i])
- 

[PATCH] Staging: erofs:converting all 'unsigned' to 'unsigned int'

2019-07-14 Thread Pratik Shinde
Fixing checkpath warnings : converting all 'unsigned' to 'unsigned int'

Signed-off-by: Pratik Shinde 
---
 drivers/staging/erofs/internal.h  |  6 +++---
 drivers/staging/erofs/unzip_pagevec.h | 10 +-
 drivers/staging/erofs/unzip_vle.h |  8 
 drivers/staging/erofs/xattr.h | 10 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 963cc1b..daae90b 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize;
unsigned short xattr_isize;
 
-   unsigned xattr_shared_count;
-   unsigned *xattr_shared_xattrs;
+   unsigned int xattr_shared_count;
+   unsigned int *xattr_shared_xattrs;
 
union {
erofs_blk_t raw_blkaddr;
@@ -510,7 +510,7 @@ erofs_grab_bio(struct super_block *sb,
return bio;
 }
 
-static inline void __submit_bio(struct bio *bio, unsigned op, unsigned 
op_flags)
+static inline void __submit_bio(struct bio *bio, unsigned int op, unsigned int 
op_flags)
 {
bio_set_op_attrs(bio, op, op_flags);
submit_bio(bio);
diff --git a/drivers/staging/erofs/unzip_pagevec.h 
b/drivers/staging/erofs/unzip_pagevec.h
index 7af0ba8..198b556 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct 
z_erofs_pagevec_ctor *ctor,
 
 static inline struct page *
 z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
-  unsigned nr)
+  unsigned int nr)
 {
-   unsigned index;
+   unsigned int index;
 
/* keep away from occupied pages */
if (ctor->next)
@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor 
*ctor,
 
for (index = 0; index < nr; ++index) {
const erofs_vtptr_t t = ctor->pages[index];
-   const unsigned tags = tagptr_unfold_tags(t);
+   const unsigned int tags = tagptr_unfold_tags(t);
 
if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE)
return tagptr_unfold_ptr(t);
@@ -91,8 +91,8 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor 
*ctor,
 }
 
 static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,
-unsigned nr,
-erofs_vtptr_t *pages, unsigned i)
+unsigned int nr,
+erofs_vtptr_t *pages, unsigned int 
i)
 {
ctor->nr = nr;
ctor->curr = ctor->next = NULL;
diff --git a/drivers/staging/erofs/unzip_vle.h 
b/drivers/staging/erofs/unzip_vle.h
index ab509d75..df91ad1 100644
--- a/drivers/staging/erofs/unzip_vle.h
+++ b/drivers/staging/erofs/unzip_vle.h
@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages;
 
/* L: queued pages in pagevec[] */
-   unsigned vcnt;
+   unsigned int vcnt;
 
union {
/* L: pagevec */
@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
unsigned long *v;
 };
 
-static inline unsigned z_erofs_onlinepage_index(struct page *page)
+static inline unsigned int z_erofs_onlinepage_index(struct page *page)
 {
union z_erofs_onlinepage_converter u;
 
@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
*page,
}
 
v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
-   ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down);
+   ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
if (cmpxchg(p, o, v) != o)
goto repeat;
 }
@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
*page,
 static inline void z_erofs_onlinepage_endio(struct page *page)
 {
union z_erofs_onlinepage_converter u;
-   unsigned v;
+   unsigned int v;
 
DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page);
diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
index 35ba5ac..2fc9b43 100644
--- a/drivers/staging/erofs/xattr.h
+++ b/drivers/staging/erofs/xattr.h
@@ -20,14 +20,14 @@
 /* Attribute not found */
 #define ENOATTR ENODATA
 
-static inline unsigned inlinexattr_header_size(struct inode *inode)
+static inline unsigned int inlinexattr_header_size(struct inode *inode)
 {
return sizeof(struct erofs_xattr_ibody_header)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
 }
 
 static inline erofs_blk_t
-xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
+xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
 {
 #ifdef CONFIG_EROFS_FS_XATTR
return sbi->xattr_blkaddr +
@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *s

Re: [PATCH v2 00/24] erofs: promote erofs from staging

2019-07-14 Thread Gao Xiang
Hi Pavel,

On 2019/7/14 18:49, Pavel Machek Wrote:
> On Thu 2019-07-11 22:57:31, Gao Xiang wrote:
>> Changelog from v1:
>>  o resend the whole filesystem into a patchset suggested by Greg;
>>  o code is more cleaner, especially for decompression frontend.
>>
>> --8<--
>>
>> Hi,
>>
>> EROFS file system has been in Linux-staging for about a year.
>> It has been proved to be stable enough to move out of staging
>> by 10+ millions of HUAWEI Android mobile phones on the market
>> from EMUI 9.0.1, and it was promoted as one of the key features
>> of EMUI 9.1 [1], including P30(pro).
> 
> Ok, maybe it is ready to be moved to kernel proper, but as git can
> do moves, would it be better to do it as one commit?
> 
> Separate patches are still better for review, I guess.

Thanks for you reply. Either form is OK for me... The first step could
be that I hope someone could kindly take some time to look into these
patches... :)

The patch v2 is slightly different for the current code in the staging
tree since I did some code cleanup these days (mainly renaming / moving,
including rename unzip_vle.{c,h} to zdata.{c,h} and some confusing
structure names and clean up internal.h...). No functional chance and I
can submit cleanup patches to staging as well if doing moves by git...

Thanks,
Gao Xiang

>   Pavel
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] mm/gup: Use put_user_page*() instead of put_page*()

2019-07-14 Thread John Hubbard
On 7/14/19 12:08 PM, Bharath Vedartham wrote:
> This patch converts all call sites of get_user_pages
> to use put_user_page*() instead of put_page*() functions to
> release reference to gup pinned pages.

Hi Bharath,

Thanks for jumping in to help, and welcome to the party!

You've caught everyone in the middle of a merge window, btw.  As a
result, I'm busy rebasing and reworking the get_user_pages call sites, 
and gup tracking, in the wake of some semi-traumatic changes to bio 
and gup and such. I plan to re-post right after 5.3-rc1 shows up, from 
here:

https://github.com/johnhubbard/linux/commits/gup_dma_core

...which you'll find already covers the changes you've posted, except for:

drivers/misc/sgi-gru/grufault.c
drivers/staging/kpc2000/kpc_dma/fileops.c

...and this one, which is undergoing to larger local changes, due to
bvec, so let's leave it out of the choices:

fs/io_uring.c

Therefore, until -rc1, if you'd like to help, I'd recommend one or more
of the following ideas:

1. Pull down https://github.com/johnhubbard/linux/commits/gup_dma_core
and find missing conversions: look for any additional missing 
get_user_pages/put_page conversions. You've already found a couple missing 
ones. I haven't re-run a search in a long time, so there's probably even more.

a) And find more, after I rebase to 5.3-rc1: people probably are adding
get_user_pages() calls as we speak. :)

2. Patches: Focus on just one subsystem at a time, and perfect the patch for
it. For example, I think this the staging driver would be perfect to start with:

drivers/staging/kpc2000/kpc_dma/fileops.c

a) verify that you've really, corrected converted the whole
driver. (Hint: I think you might be overlooking a put_page call.)

b) Attempt to test it if you can (I'm being hypocritical in
the extreme here, but one of my problems is that testing
has been light, so any help is very valuable). qemu...?
OTOH, maybe even qemu cannot easily test a kpc2000, but
perhaps `git blame` and talking to the authors would help
figure out a way to validate the changes.

Thinking about whether you can run a test that would prove or
disprove my claim in (a), above, could be useful in coming up
with tests to run.

In other words, a few very high quality conversions (even just one) that
we can really put our faith in, is what I value most here. Tested patches
are awesome.

3. Once I re-post, turn on the new CONFIG_DEBUG_GET_USER_PAGES_REFERENCES
and run things such as xfstest/fstest. (Again, doing so would be going
further than I have yet--very helpful). Help clarify what conversions have
actually been tested and work, and which ones remain unvalidated.

Other: Please note that this:

https://github.com/johnhubbard/linux/commits/gup_dma_core

a) gets rebased often, and

b) has a bunch of commits (iov_iter and related) that conflict
   with the latest linux.git,

c) has some bugs in the bio area, that I'm fixing, so I don't trust
   that's it's safely runnable, for a few more days.

One note below, for the future:

> 
> This is a bunch of trivial conversions which is a part of an effort
> by John Hubbard to solve issues with gup pinned pages and 
> filesystem writeback.
> 
> The issue is more clearly described in John Hubbard's patch[1] where
> put_user_page*() functions are introduced.
> 
> Currently put_user_page*() simply does put_page but future implementations
> look to change that once treewide change of put_page callsites to 
> put_user_page*() is finished.
> 
> The lwn article describing the issue with gup pinned pages and filesystem 
> writeback [2].
> 
> This patch has been tested by building and booting the kernel as I don't
> have the required hardware to test the device drivers.
> 
> I did not modify gpu/drm drivers which use release_pages instead of
> put_page() to release reference of gup pinned pages as I am not clear
> whether release_pages and put_page are interchangable. 
> 
> [1] https://lkml.org/lkml/2019/3/26/1396

When referring to patches in a commit description, please use the 
commit hash, not an external link. See Submitting Patches [1] for details.

Also, once you figure out the right maintainers and other involved people,
putting Cc: in the commit description is common practice, too.

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html

thanks,
-- 
John Hubbard
NVIDIA

> 
> [2] https://lwn.net/Articles/784574/
> 
> Signed-off-by: Bharath Vedartham 
> ---
>  drivers/media/v4l2-core/videobuf-dma-sg.c | 3 +--
>  drivers/misc/sgi-gru/grufault.c   | 2 +-
>  drivers/staging/kpc2000/kpc_dma/fileops.c | 4 +---
>  drivers/vfio/vfio_iommu_type1.c   | 2 +-
>  fs/io_uring.c | 7 +++
>  mm/gup_benchmark.c| 6 +-
>  net/xdp/xdp_umem.c| 7 +--
>  7 files changed, 9 insertions(

[PATCH] staging: rtl8712: Fix alignment with open parenthesis

2019-07-14 Thread christianluciano . m
From: Christian Luciano Moreno 

Fix 'CHECK: Alignment should match open parenthesis' reported by checkpatch.

Signed-off-by: Christian Luciano Moreno 
---
 drivers/staging/rtl8712/usb_ops.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8712/usb_ops.c 
b/drivers/staging/rtl8712/usb_ops.c
index eef52d5c730a..2fc33ee969b2 100644
--- a/drivers/staging/rtl8712/usb_ops.c
+++ b/drivers/staging/rtl8712/usb_ops.c
@@ -37,8 +37,8 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
index = 0;
wvalue = (u16)(addr & 0x);
len = 1;
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
return (u8)(le32_to_cpu(data) & 0x0ff);
 }
 
@@ -57,8 +57,8 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
index = 0;
wvalue = (u16)(addr & 0x);
len = 2;
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
return (u16)(le32_to_cpu(data) & 0x);
 }
 
@@ -77,8 +77,8 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
index = 0;
wvalue = (u16)(addr & 0x);
len = 4;
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
return le32_to_cpu(data);
 }
 
@@ -98,8 +98,8 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, 
u8 val)
wvalue = (u16)(addr & 0x);
len = 1;
data = cpu_to_le32((u32)val & 0x00ff);
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
 }
 
 static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
@@ -118,8 +118,8 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 
addr, u16 val)
wvalue = (u16)(addr & 0x);
len = 2;
data = cpu_to_le32((u32)val & 0x);
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
 }
 
 static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
@@ -138,8 +138,8 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 
addr, u32 val)
wvalue = (u16)(addr & 0x);
len = 4;
data = cpu_to_le32(val);
-   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len,
- requesttype);
+   r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index,
+   &data, len, requesttype);
 }
 
 void r8712_usb_set_intf_option(u32 *poption)
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8712: Fix alignment with open parenthesis

2019-07-14 Thread christianluciano . m
From: Christian Luciano Moreno 

Fix 'CHECK: Alignment should match open parenthesis' reported by checkpatch.

Signed-off-by: Christian Luciano Moreno 
---
 drivers/staging/rtl8712/usb_ops.h   |  9 +
 drivers/staging/rtl8712/usb_ops_linux.c | 13 +++--
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8712/usb_ops.h 
b/drivers/staging/rtl8712/usb_ops.h
index d62975447d29..5e825dda49e5 100644
--- a/drivers/staging/rtl8712/usb_ops.h
+++ b/drivers/staging/rtl8712/usb_ops.h
@@ -21,9 +21,9 @@
 void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr,
 u32 cnt, u8 *wmem);
 u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr,
- u32 cnt, u8 *wmem);
+u32 cnt, u8 *wmem);
 u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr,
-u32 cnt, u8 *rmem);
+   u32 cnt, u8 *rmem);
 void r8712_usb_set_intf_option(u32 *poption);
 void r8712_usb_set_intf_funs(struct intf_hdl *pintf_hdl);
 uint r8712_usb_init_intf_priv(struct intf_priv *pintfpriv);
@@ -31,8 +31,9 @@ void r8712_usb_unload_intf_priv(struct intf_priv *pintfpriv);
 void r8712_usb_set_intf_ops(struct _io_ops *pops);
 void r8712_usb_read_port_cancel(struct _adapter *padapter);
 void r8712_usb_write_port_cancel(struct _adapter *padapter);
-int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
- u16 index, void *pdata, u16 len, u8 requesttype);
+int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request,
+   u16 value, u16 index, void *pdata,
+   u16 len, u8 requesttype);
 
 #endif
 
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c 
b/drivers/staging/rtl8712/usb_ops_linux.c
index 9d290bc2fdb7..5ba9ac6cb6b4 100644
--- a/drivers/staging/rtl8712/usb_ops_linux.c
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
@@ -192,7 +192,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)
if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
(purb->actual_length < RXDESC_SIZE)) {
r8712_read_port(padapter, precvpriv->ff_hwaddr, 0,
- (unsigned char *)precvbuf);
+   (unsigned char *)precvbuf);
} else {
_pkt *pskb = precvbuf->pskb;
 
@@ -228,7 +228,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)
/* Fall through. */
case -EPROTO:
r8712_read_port(padapter, precvpriv->ff_hwaddr, 0,
- (unsigned char *)precvbuf);
+   (unsigned char *)precvbuf);
break;
case -EINPROGRESS:
netdev_err(padapter->pnetdev, "ERROR: URB IS IN 
PROGRESS!\n");
@@ -262,8 +262,9 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 
addr, u32 cnt, u8 *rmem)
precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue);
 
if (!precvbuf->pskb) {
-   precvbuf->pskb = netdev_alloc_skb(adapter->pnetdev,
-MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
+   precvbuf->pskb =
+   netdev_alloc_skb(adapter->pnetdev,
+MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
if (!precvbuf->pskb)
return _FAIL;
tmpaddr = (addr_t)precvbuf->pskb->data;
@@ -367,7 +368,7 @@ static void usb_write_port_complete(struct urb *purb)
break;
default:
netdev_warn(padapter->pnetdev,
-   "r8712u: pipe error: (%d)\n", purb->status);
+   "r8712u: pipe error: (%d)\n", purb->status);
break;
}
/* not to consider tx fragment */
@@ -467,7 +468,7 @@ void r8712_usb_write_port_cancel(struct _adapter *padapter)
 }
 
 int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
- u16 index, void *pdata, u16 len, u8 requesttype)
+   u16 index, void *pdata, u16 len, u8 requesttype)
 {
unsigned int pipe;
int status;
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8712: Align code with open parenthesis

2019-07-14 Thread christianluciano . m
From: Christian Luciano Moreno 

Fix 'CHECK: Alignment should match open parenthesis' reported by
checkpatch.

Signed-off-by: Christian Luciano Moreno 
---
 drivers/staging/rtl8712/xmit_osdep.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8712/xmit_osdep.h 
b/drivers/staging/rtl8712/xmit_osdep.h
index 21f6b31e0f50..b76021b568f8 100644
--- a/drivers/staging/rtl8712/xmit_osdep.h
+++ b/drivers/staging/rtl8712/xmit_osdep.h
@@ -37,16 +37,16 @@ struct xmit_buf;
 int r8712_xmit_entry(_pkt *pkt, struct  net_device *pnetdev);
 void r8712_SetFilter(struct work_struct *work);
 int r8712_xmit_resource_alloc(struct _adapter *padapter,
-  struct xmit_buf *pxmitbuf);
+ struct xmit_buf *pxmitbuf);
 void r8712_xmit_resource_free(struct _adapter *padapter,
-  struct xmit_buf *pxmitbuf);
+ struct xmit_buf *pxmitbuf);
 
 void r8712_set_qos(struct pkt_file *ppktfile,
-   struct pkt_attrib *pattrib);
+  struct pkt_attrib *pattrib);
 void _r8712_open_pktfile(_pkt *pktptr, struct pkt_file *pfile);
 uint _r8712_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
 sint r8712_endofpktfile(struct pkt_file *pfile);
 void r8712_xmit_complete(struct _adapter *padapter,
-struct xmit_frame *pxframe);
+struct xmit_frame *pxframe);
 
 #endif
-- 
2.22.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


iaug

2019-07-14 Thread fWmcS
可开票
ⓥⓧ:ⓢⓢcc5⑥87


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: erofs:converting all 'unsigned' to 'unsigned int'

2019-07-14 Thread Gao Xiang
Hi Pratik,

On 2019/7/15 3:30, Pratik Shinde wrote:
> Fixing checkpath warnings : converting all 'unsigned' to 'unsigned int'
> 
> Signed-off-by: Pratik Shinde 
> ---
>  drivers/staging/erofs/internal.h  |  6 +++---
>  drivers/staging/erofs/unzip_pagevec.h | 10 +-
>  drivers/staging/erofs/unzip_vle.h |  8 
>  drivers/staging/erofs/xattr.h | 10 +-
>  4 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/staging/erofs/internal.h 
> b/drivers/staging/erofs/internal.h
> index 963cc1b..daae90b 100644
> --- a/drivers/staging/erofs/internal.h
> +++ b/drivers/staging/erofs/internal.h
> @@ -359,8 +359,8 @@ struct erofs_vnode {
>   unsigned char inode_isize;
>   unsigned short xattr_isize;
>  
> - unsigned xattr_shared_count;
> - unsigned *xattr_shared_xattrs;
> + unsigned int xattr_shared_count;
> + unsigned int *xattr_shared_xattrs;
>  
>   union {
>   erofs_blk_t raw_blkaddr;
> @@ -510,7 +510,7 @@ erofs_grab_bio(struct super_block *sb,
>   return bio;
>  }
>  
> -static inline void __submit_bio(struct bio *bio, unsigned op, unsigned 
> op_flags)
> +static inline void __submit_bio(struct bio *bio, unsigned int op, unsigned 
> int op_flags)

The subject line could be better as "staging: erofs: converting all 'unsigned' 
to 'unsigned int' "
and three new checkpatch warnings occurs after this patch...


WARNING: line over 80 characters
#86: FILE: drivers/staging/erofs/internal.h:513:
+static inline void __submit_bio(struct bio *bio, unsigned int op, unsigned int 
op_flags)

WARNING: line over 80 characters
#122: FILE: drivers/staging/erofs/unzip_pagevec.h:95:
+erofs_vtptr_t *pages, unsigned int 
i)

WARNING: line over 80 characters
#203: FILE: drivers/staging/erofs/xattr.h:52:
+static inline const struct xattr_handler *erofs_xattr_handler(unsigned int 
index)

Thanks,
Gao Xiang

>  {
>   bio_set_op_attrs(bio, op, op_flags);
>   submit_bio(bio);
> diff --git a/drivers/staging/erofs/unzip_pagevec.h 
> b/drivers/staging/erofs/unzip_pagevec.h
> index 7af0ba8..198b556 100644
> --- a/drivers/staging/erofs/unzip_pagevec.h
> +++ b/drivers/staging/erofs/unzip_pagevec.h
> @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct 
> z_erofs_pagevec_ctor *ctor,
>  
>  static inline struct page *
>  z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
> -unsigned nr)
> +unsigned int nr)
>  {
> - unsigned index;
> + unsigned int index;
>  
>   /* keep away from occupied pages */
>   if (ctor->next)
> @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor 
> *ctor,
>  
>   for (index = 0; index < nr; ++index) {
>   const erofs_vtptr_t t = ctor->pages[index];
> - const unsigned tags = tagptr_unfold_tags(t);
> + const unsigned int tags = tagptr_unfold_tags(t);
>  
>   if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE)
>   return tagptr_unfold_ptr(t);
> @@ -91,8 +91,8 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor 
> *ctor,
>  }
>  
>  static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor 
> *ctor,
> -  unsigned nr,
> -  erofs_vtptr_t *pages, unsigned i)
> +  unsigned int nr,
> +  erofs_vtptr_t *pages, unsigned int 
> i)
>  {
>   ctor->nr = nr;
>   ctor->curr = ctor->next = NULL;
> diff --git a/drivers/staging/erofs/unzip_vle.h 
> b/drivers/staging/erofs/unzip_vle.h
> index ab509d75..df91ad1 100644
> --- a/drivers/staging/erofs/unzip_vle.h
> +++ b/drivers/staging/erofs/unzip_vle.h
> @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
>   unsigned short nr_pages;
>  
>   /* L: queued pages in pagevec[] */
> - unsigned vcnt;
> + unsigned int vcnt;
>  
>   union {
>   /* L: pagevec */
> @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
>   unsigned long *v;
>  };
>  
> -static inline unsigned z_erofs_onlinepage_index(struct page *page)
> +static inline unsigned int z_erofs_onlinepage_index(struct page *page)
>  {
>   union z_erofs_onlinepage_converter u;
>  
> @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
> *page,
>   }
>  
>   v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
> - ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down);
> + ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
>   if (cmpxchg(p, o, v) != o)
>   goto repeat;
>  }
> @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
> *page,
>  static inline void z_erofs_onlinepage_endio(struct page *page)
>  {
>   union z_erofs_onlinepage_converter u;
> - unsigned v;
> + unsigned int v

Re: [PATCH] mm/gup: Use put_user_page*() instead of put_page*()

2019-07-14 Thread Jens Axboe
On 7/14/19 1:08 PM, Bharath Vedartham wrote:
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 4ef62a4..b4a4549 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -2694,10 +2694,9 @@ static int io_sqe_buffer_register(struct io_ring_ctx 
> *ctx, void __user *arg,
>* if we did partial map, or found file backed vmas,
>* release any pages we did get
>*/
> - if (pret > 0) {
> - for (j = 0; j < pret; j++)
> - put_page(pages[j]);
> - }
> + if (pret > 0)
> + put_user_pages(pages, pret);
> +
>   if (ctx->account_mem)
>   io_unaccount_mem(ctx->user, nr_pages);
>   kvfree(imu->bvec);

You handled just the failure case of the buffer registration, but not
the actual free in io_sqe_buffer_unregister().

-- 
Jens Axboe

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'

2019-07-14 Thread Pratik Shinde
Fixed check patch warnings: converting all 'unsigned' to 'unsigned int'

Signed-off-by: Pratik Shinde 
---
 drivers/staging/erofs/internal.h  |  7 ---
 drivers/staging/erofs/unzip_pagevec.h | 11 ++-
 drivers/staging/erofs/unzip_vle.h |  8 
 drivers/staging/erofs/xattr.h | 11 ++-
 4 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 963cc1b..0ebc294 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize;
unsigned short xattr_isize;
 
-   unsigned xattr_shared_count;
-   unsigned *xattr_shared_xattrs;
+   unsigned int xattr_shared_count;
+   unsigned int *xattr_shared_xattrs;
 
union {
erofs_blk_t raw_blkaddr;
@@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
return bio;
 }
 
-static inline void __submit_bio(struct bio *bio, unsigned op, unsigned 
op_flags)
+static inline void __submit_bio(struct bio *bio, unsigned int op,
+   unsigned int op_flags)
 {
bio_set_op_attrs(bio, op, op_flags);
submit_bio(bio);
diff --git a/drivers/staging/erofs/unzip_pagevec.h 
b/drivers/staging/erofs/unzip_pagevec.h
index 7af0ba8..e65dbca 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct 
z_erofs_pagevec_ctor *ctor,
 
 static inline struct page *
 z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
-  unsigned nr)
+  unsigned int nr)
 {
-   unsigned index;
+   unsigned int index;
 
/* keep away from occupied pages */
if (ctor->next)
@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor 
*ctor,
 
for (index = 0; index < nr; ++index) {
const erofs_vtptr_t t = ctor->pages[index];
-   const unsigned tags = tagptr_unfold_tags(t);
+   const unsigned int tags = tagptr_unfold_tags(t);
 
if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE)
return tagptr_unfold_ptr(t);
@@ -91,8 +91,9 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor 
*ctor,
 }
 
 static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,
-unsigned nr,
-erofs_vtptr_t *pages, unsigned i)
+unsigned int nr,
+erofs_vtptr_t *pages,
+unsigned int i)
 {
ctor->nr = nr;
ctor->curr = ctor->next = NULL;
diff --git a/drivers/staging/erofs/unzip_vle.h 
b/drivers/staging/erofs/unzip_vle.h
index ab509d75..df91ad1 100644
--- a/drivers/staging/erofs/unzip_vle.h
+++ b/drivers/staging/erofs/unzip_vle.h
@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages;
 
/* L: queued pages in pagevec[] */
-   unsigned vcnt;
+   unsigned int vcnt;
 
union {
/* L: pagevec */
@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
unsigned long *v;
 };
 
-static inline unsigned z_erofs_onlinepage_index(struct page *page)
+static inline unsigned int z_erofs_onlinepage_index(struct page *page)
 {
union z_erofs_onlinepage_converter u;
 
@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
*page,
}
 
v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
-   ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down);
+   ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
if (cmpxchg(p, o, v) != o)
goto repeat;
 }
@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
*page,
 static inline void z_erofs_onlinepage_endio(struct page *page)
 {
union z_erofs_onlinepage_converter u;
-   unsigned v;
+   unsigned int v;
 
DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page);
diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
index 35ba5ac..bbf13c4 100644
--- a/drivers/staging/erofs/xattr.h
+++ b/drivers/staging/erofs/xattr.h
@@ -20,14 +20,14 @@
 /* Attribute not found */
 #define ENOATTR ENODATA
 
-static inline unsigned inlinexattr_header_size(struct inode *inode)
+static inline unsigned int inlinexattr_header_size(struct inode *inode)
 {
return sizeof(struct erofs_xattr_ibody_header)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
 }
 
 static inline erofs_blk_t
-xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
+xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
 {
 #ifdef CONFIG_EROFS_FS_XATTR
return 

Re: [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'

2019-07-14 Thread Gao Xiang



On 2019/7/15 13:50, Pratik Shinde wrote:
> Fixed check patch warnings: converting all 'unsigned' to 'unsigned int'
> 
> Signed-off-by: Pratik Shinde 

The subject line should be better as "[PATCH v2] staging: erofs:converting all 
'unsigned' to 'unsigned int'"

> ---
>  drivers/staging/erofs/internal.h  |  7 ---
>  drivers/staging/erofs/unzip_pagevec.h | 11 ++-
>  drivers/staging/erofs/unzip_vle.h |  8 
>  drivers/staging/erofs/xattr.h | 11 ++-
>  4 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/staging/erofs/internal.h 
> b/drivers/staging/erofs/internal.h
> index 963cc1b..0ebc294 100644
> --- a/drivers/staging/erofs/internal.h
> +++ b/drivers/staging/erofs/internal.h
> @@ -359,8 +359,8 @@ struct erofs_vnode {
>   unsigned char inode_isize;
>   unsigned short xattr_isize;
>  
> - unsigned xattr_shared_count;
> - unsigned *xattr_shared_xattrs;
> + unsigned int xattr_shared_count;
> + unsigned int *xattr_shared_xattrs;
>  
>   union {
>   erofs_blk_t raw_blkaddr;
> @@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
>   return bio;
>  }
>  
> -static inline void __submit_bio(struct bio *bio, unsigned op, unsigned 
> op_flags)
> +static inline void __submit_bio(struct bio *bio, unsigned int op,
> + unsigned int op_flags)
>  {
>   bio_set_op_attrs(bio, op, op_flags);
>   submit_bio(bio);
> diff --git a/drivers/staging/erofs/unzip_pagevec.h 
> b/drivers/staging/erofs/unzip_pagevec.h
> index 7af0ba8..e65dbca 100644
> --- a/drivers/staging/erofs/unzip_pagevec.h
> +++ b/drivers/staging/erofs/unzip_pagevec.h
> @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct 
> z_erofs_pagevec_ctor *ctor,
>  
>  static inline struct page *
>  z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
> -unsigned nr)
> +unsigned int nr)
>  {
> - unsigned index;
> + unsigned int index;
>  
>   /* keep away from occupied pages */
>   if (ctor->next)
> @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor 
> *ctor,
>  
>   for (index = 0; index < nr; ++index) {
>   const erofs_vtptr_t t = ctor->pages[index];
> - const unsigned tags = tagptr_unfold_tags(t);
> + const unsigned int tags = tagptr_unfold_tags(t);
>  
>   if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE)
>   return tagptr_unfold_ptr(t);
> @@ -91,8 +91,9 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor 
> *ctor,
>  }
>  
>  static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor 
> *ctor,
> -  unsigned nr,
> -  erofs_vtptr_t *pages, unsigned i)
> +  unsigned int nr,
> +  erofs_vtptr_t *pages,
> +  unsigned int i)
>  {
>   ctor->nr = nr;
>   ctor->curr = ctor->next = NULL;
> diff --git a/drivers/staging/erofs/unzip_vle.h 
> b/drivers/staging/erofs/unzip_vle.h
> index ab509d75..df91ad1 100644
> --- a/drivers/staging/erofs/unzip_vle.h
> +++ b/drivers/staging/erofs/unzip_vle.h
> @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
>   unsigned short nr_pages;
>  
>   /* L: queued pages in pagevec[] */
> - unsigned vcnt;
> + unsigned int vcnt;
>  
>   union {
>   /* L: pagevec */
> @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
>   unsigned long *v;
>  };
>  
> -static inline unsigned z_erofs_onlinepage_index(struct page *page)
> +static inline unsigned int z_erofs_onlinepage_index(struct page *page)
>  {
>   union z_erofs_onlinepage_converter u;
>  
> @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
> *page,
>   }
>  
>   v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
> - ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down);
> + ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
>   if (cmpxchg(p, o, v) != o)
>   goto repeat;
>  }
> @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page 
> *page,
>  static inline void z_erofs_onlinepage_endio(struct page *page)
>  {
>   union z_erofs_onlinepage_converter u;
> - unsigned v;
> + unsigned int v;
>  
>   DBG_BUGON(!PagePrivate(page));
>   u.v = &page_private(page);
> diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
> index 35ba5ac..bbf13c4 100644
> --- a/drivers/staging/erofs/xattr.h
> +++ b/drivers/staging/erofs/xattr.h
> @@ -20,14 +20,14 @@
>  /* Attribute not found */
>  #define ENOATTR ENODATA
>  
> -static inline unsigned inlinexattr_header_size(struct inode *inode)
> +static inline unsigned int inlinexattr_header_size(struct inode *inode)
>  {
>   r

Re: [PATCH] mm/gup: Use put_user_page*() instead of put_page*()

2019-07-14 Thread Bharath Vedartham
On Sun, Jul 14, 2019 at 04:33:42PM -0700, John Hubbard wrote:
> On 7/14/19 12:08 PM, Bharath Vedartham wrote:
> > This patch converts all call sites of get_user_pages
> > to use put_user_page*() instead of put_page*() functions to
> > release reference to gup pinned pages.
Hi John, 
> Hi Bharath,
> 
> Thanks for jumping in to help, and welcome to the party!
> 
> You've caught everyone in the middle of a merge window, btw.  As a
> result, I'm busy rebasing and reworking the get_user_pages call sites, 
> and gup tracking, in the wake of some semi-traumatic changes to bio 
> and gup and such. I plan to re-post right after 5.3-rc1 shows up, from 
> here:
> 
> https://github.com/johnhubbard/linux/commits/gup_dma_core
> 
> ...which you'll find already covers the changes you've posted, except for:
> 
> drivers/misc/sgi-gru/grufault.c
> drivers/staging/kpc2000/kpc_dma/fileops.c
> 
> ...and this one, which is undergoing to larger local changes, due to
> bvec, so let's leave it out of the choices:
> 
> fs/io_uring.c
> 
> Therefore, until -rc1, if you'd like to help, I'd recommend one or more
> of the following ideas:
> 
> 1. Pull down https://github.com/johnhubbard/linux/commits/gup_dma_core
> and find missing conversions: look for any additional missing 
> get_user_pages/put_page conversions. You've already found a couple missing 
> ones. I haven't re-run a search in a long time, so there's probably even more.
>   a) And find more, after I rebase to 5.3-rc1: people probably are adding
>   get_user_pages() calls as we speak. :)
Shouldn't this be documented then? I don't see any docs for using
put_user_page*() in v5.2.1 in the memory management API section?
> 2. Patches: Focus on just one subsystem at a time, and perfect the patch for
> it. For example, I think this the staging driver would be perfect to start 
> with:
> 
> drivers/staging/kpc2000/kpc_dma/fileops.c
> 
>   a) verify that you've really, corrected converted the whole
>   driver. (Hint: I think you might be overlooking a put_page call.)
Yup. I did see that! Will fix it!
>   b) Attempt to test it if you can (I'm being hypocritical in
>   the extreme here, but one of my problems is that testing
>   has been light, so any help is very valuable). qemu...?
>   OTOH, maybe even qemu cannot easily test a kpc2000, but
>   perhaps `git blame` and talking to the authors would help
>   figure out a way to validate the changes.
Great! I ll do that, I ll mail the patch authors and ask them for help
in testing. 
>   Thinking about whether you can run a test that would prove or
>   disprove my claim in (a), above, could be useful in coming up
>   with tests to run.

> In other words, a few very high quality conversions (even just one) that
> we can really put our faith in, is what I value most here. Tested patches
> are awesome.
I understand that! 
> 3. Once I re-post, turn on the new CONFIG_DEBUG_GET_USER_PAGES_REFERENCES
> and run things such as xfstest/fstest. (Again, doing so would be going
> further than I have yet--very helpful). Help clarify what conversions have
> actually been tested and work, and which ones remain unvalidated.
> Other: Please note that this:
Yup will do that.
> https://github.com/johnhubbard/linux/commits/gup_dma_core
> 
> a) gets rebased often, and
> 
> b) has a bunch of commits (iov_iter and related) that conflict
>with the latest linux.git,
> 
> c) has some bugs in the bio area, that I'm fixing, so I don't trust
>that's it's safely runnable, for a few more days.
I assume your repo contains only work related to fixing gup issues and
not the main repo for gup development? i.e where gup changes are merged?
Also are release_pages and put_user_pages interchangable? 
> One note below, for the future:
> 
> > 
> > This is a bunch of trivial conversions which is a part of an effort
> > by John Hubbard to solve issues with gup pinned pages and 
> > filesystem writeback.
> > 
> > The issue is more clearly described in John Hubbard's patch[1] where
> > put_user_page*() functions are introduced.
> > 
> > Currently put_user_page*() simply does put_page but future implementations
> > look to change that once treewide change of put_page callsites to 
> > put_user_page*() is finished.
> > 
> > The lwn article describing the issue with gup pinned pages and filesystem 
> > writeback [2].
> > 
> > This patch has been tested by building and booting the kernel as I don't
> > have the required hardware to test the device drivers.
> > 
> > I did not modify gpu/drm drivers which use release_pages instead of
> > put_page() to release reference of gup pinned pages as I am not clear
> > whether release_pages and put_page are interchangable. 
> > 
> > [1] https://lkml.org/lkml/2019/3/26/1396
> 
> When referring to patches in a commit description, please use the 
> commit hash, not an external link. See Submitting Patches [1] for details.
> 
> Also, once you figure o