[PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()
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 more information. [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 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(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c index f6d7157..d712ad4 100644 --- a/drivers/staging/gasket/gasket_page_table.c +++ b/drivers/staging/gasket/gasket_page_table.c @@ -449,7 +449,7 @@ static bool gasket_release_page(struct page *page) if (!PageReserved(page)) SetPageDirty(page); - put_page(page); + unpin_user_page(page); return true; } @@ -486,12 +486,12 @@ static int gasket_perform_mapping(struct gasket_page_table *pg_tbl, ptes[i].dma_addr = pg_tbl->coherent_pages[0].paddr + off + i * PAGE_SIZE; } else { - ret = get_user_pages_fast(page_addr - offset, 1, + ret = pin_user_pages_fast(page_addr - offset, 1, FOLL_WRITE, &page); if (ret <= 0) { dev_err(pg_tbl->device, - "get user pages failed for addr=0x%lx, offset=0x%lx [ret=%d]\n", + "pin user pages failed for addr=0x%lx, offset=0x%lx [ret=%d]\n", page_addr, offset, ret); return ret ? ret : -ENOMEM; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()
On Sun, May 31, 2020 at 12:53:11PM +0530, 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 more information. > > [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 > Cc: Dan Carpenter > Acked-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] media: atomisp: get rid of a left-over wrapper function
The abstraction layer for kvfree() was removed, but there is still a left-over code there. Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/sh_css.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 9c754e29fa00..9f3e421cd717 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -1861,14 +1861,6 @@ ia_css_enable_isys_event_queue(bool enable) { return 0; } -void sh_css_free(void *ptr) -{ - if (is_vmalloc_addr(ptr)) - vfree(ptr); - else - kfree(ptr); -} - /* For Acceleration API: Flush FW (shared buffer pointer) arguments */ void sh_css_flush(struct ia_css_acc_fw *fw) -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] media: atomisp comment an unused code
There's a different table for some BYT variants that depend on something inside a FIXME ifdef. Place this also inside it, just to shut up a clang-11 warning. Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 094a2886bd62..5ac63c77570a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -392,6 +392,13 @@ static const struct atomisp_freq_scaling_rule dfs_rules_byt_cr[] = { }, }; +#ifdef FIXME +/* + * Disable this, as it is used only when this is true: + * INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, CRV2) || + * INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) + * However, the original code is commented + */ static const struct atomisp_dfs_config dfs_config_byt_cr = { .lowest_freq = ISP_FREQ_200MHZ, .max_freq_at_vmin = ISP_FREQ_320MHZ, @@ -399,6 +406,7 @@ static const struct atomisp_dfs_config dfs_config_byt_cr = { .dfs_table = dfs_rules_byt_cr, .dfs_table_size = ARRAY_SIZE(dfs_rules_byt_cr), }; +#endif static const struct atomisp_freq_scaling_rule dfs_rules_cht[] = { { -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:rtl8712: avoid skb_clone after skb allocation fail
The skb allocated when out of memory is likely to be discarded during subsequent processing. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8712/rtl8712_recv.c | 29 ++ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index 116773943a2e..570030be3077 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -1037,24 +1037,17 @@ static void recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) */ alloc_sz += 6; pkt_copy = netdev_alloc_skb(padapter->pnetdev, alloc_sz); - if (pkt_copy) { - precvframe->u.hdr.pkt = pkt_copy; - skb_reserve(pkt_copy, 4 - ((addr_t)(pkt_copy->data) - % 4)); - skb_reserve(pkt_copy, shift_sz); - memcpy(pkt_copy->data, pbuf, tmp_len); - precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = -precvframe->u.hdr.rx_tail = pkt_copy->data; - precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz; - } else { - precvframe->u.hdr.pkt = skb_clone(pskb, GFP_ATOMIC); - if (!precvframe->u.hdr.pkt) - return; - precvframe->u.hdr.rx_head = pbuf; - precvframe->u.hdr.rx_data = pbuf; - precvframe->u.hdr.rx_tail = pbuf; - precvframe->u.hdr.rx_end = pbuf + alloc_sz; - } + if (!pkt_copy) + return; + + precvframe->u.hdr.pkt = pkt_copy; + skb_reserve(pkt_copy, 4 - ((addr_t)(pkt_copy->data) % 4)); + skb_reserve(pkt_copy, shift_sz); + memcpy(pkt_copy->data, pbuf, tmp_len); + precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = + precvframe->u.hdr.rx_tail = pkt_copy->data; + precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz; + recvframe_put(precvframe, tmp_len); recvframe_pull(precvframe, drvinfo_sz + RXDESC_SIZE); /* because the endian issue, driver avoid reference to the -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:r8723bs: remove wrappers around skb_clone()
Wrappers around skb_clone() do not simplify the driver code. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8723bs/include/osdep_service.h | 3 --- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 5 - drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h index 5f681899bbec..be34e279670b 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service.h +++ b/drivers/staging/rtl8723bs/include/osdep_service.h @@ -94,7 +94,6 @@ void _kfree(u8 *pbuf, u32 sz); struct sk_buff *_rtw_skb_alloc(u32 sz); struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb); -struct sk_buff *_rtw_skb_clone(struct sk_buff *skb); int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_malloc(sz) _rtw_malloc((sz)) @@ -103,9 +102,7 @@ int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_skb_alloc(size) _rtw_skb_alloc((size)) #define rtw_skb_alloc_f(size, mstat_f) _rtw_skb_alloc((size)) #define rtw_skb_copy(skb) _rtw_skb_copy((skb)) -#define rtw_skb_clone(skb) _rtw_skb_clone((skb)) #define rtw_skb_copy_f(skb, mstat_f) _rtw_skb_copy((skb)) -#define rtw_skb_clone_f(skb, mstat_f) _rtw_skb_clone((skb)) #define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb) extern void _rtw_init_queue(struct __queue *pqueue); diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 4238209ec175..6d443197a0cf 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -47,11 +47,6 @@ inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb) return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); } -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) -{ - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); -} - inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) { skb->dev = ndev; diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index eb4d1c3008fe..b2a1bbb30df6 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); - pskb2 = rtw_skb_clone(pkt); + pskb2 = skb_clone(pkt, GFP_ATOMIC); } else { psta = rtw_get_stainfo(pstapriv, pattrib->dst); } -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone()
On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote: > Wrappers around skb_clone() do not simplify the driver code. [] > -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) > -{ > - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); > -} > - [] > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > b/drivers/staging/rtl8723bs/os_dep/recv_linux.c [] > @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, > _pkt *pkt, struct rx_pkt > if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), > ETH_ALEN)) { > if (bmcast) { > psta = rtw_get_bcmc_stainfo(padapter); > - pskb2 = rtw_skb_clone(pkt); > + pskb2 = skb_clone(pkt, GFP_ATOMIC); Why make every clone allocation GFP_ATOMIC ? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone()
On 5/31/20 7:15 PM, Joe Perches wrote: On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote: Wrappers around skb_clone() do not simplify the driver code. [] -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) -{ - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); -} - [] diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c [] @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); - pskb2 = rtw_skb_clone(pkt); + pskb2 = skb_clone(pkt, GFP_ATOMIC); Why make every clone allocation GFP_ATOMIC ? The rtw_os_recv_indicate_pkt() is always called from an interrupt handler. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()
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 more information. When pin_user_pages() returns numbers of partially mapped pages, those pages were not unpinned as part of error handling. Fixed 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 testing help is much appriciated. drivers/staging/kpc2000/kpc_dma/fileops.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c index 8975346..29bab13 100644 --- a/drivers/staging/kpc2000/kpc_dma/fileops.c +++ b/drivers/staging/kpc2000/kpc_dma/fileops.c @@ -48,6 +48,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv, u64 card_addr; u64 dma_addr; u64 user_ctl; + int nr_pages = 0; ldev = priv->ldev; @@ -76,13 +77,15 @@ static int kpc_dma_transfer(struct dev_private_data *priv, // Lock the user buffer pages in memory, and hold on to the page pointers (for the sglist) mmap_read_lock(current->mm); /* get memory map semaphore */ - rv = get_user_pages(iov_base, acd->page_count, FOLL_TOUCH | FOLL_WRITE | FOLL_GET, acd->user_pages, NULL); + rv = pin_user_pages(iov_base, acd->page_count, FOLL_TOUCH | FOLL_WRITE, acd->user_pages, NULL); mmap_read_unlock(current->mm);/* release the semaphore */ if (rv != acd->page_count) { - dev_err(&priv->ldev->pldev->dev, "Couldn't get_user_pages (%ld)\n", rv); + dev_err(&priv->ldev->pldev->dev, "Couldn't pin_user_pages (%ld)\n", rv); + nr_pages = rv; goto err_get_user_pages; } + nr_pages = acd->page_count; // Allocate and setup the sg_table (scatterlist entries) rv = sg_alloc_table_from_pages(&acd->sgt, acd->user_pages, acd->page_count, iov_base & (PAGE_SIZE - 1), iov_len, GFP_KERNEL); if (rv) { @@ -189,10 +192,9 @@ static int kpc_dma_transfer(struct dev_private_data *priv, 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]); - err_get_user_pages: + if (nr_pages > 0) + unpin_user_pages(acd->user_pages, nr_pages); kfree(acd->user_pages); err_alloc_userpages: kfree(acd); @@ -217,8 +219,7 @@ void transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags) dma_unmap_sg(&acd->ldev->pldev->dev, acd->sgt.sgl, acd->sgt.nents, acd->ldev->dir); - for (i = 0 ; i < acd->page_count ; i++) - put_page(acd->user_pages[i]); + unpin_user_pages(acd->user_pages, acd->page_count); sg_free_table(&acd->sgt); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone()
On 5/31/20 8:36 PM, Joe Perches wrote: On Sun, 2020-05-31 at 20:28 +0300, Ivan Safonov wrote: On 5/31/20 7:15 PM, Joe Perches wrote: On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote: Wrappers around skb_clone() do not simplify the driver code. [] -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) -{ - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); -} - [] diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c [] @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); - pskb2 = rtw_skb_clone(pkt); + pskb2 = skb_clone(pkt, GFP_ATOMIC); Why make every clone allocation GFP_ATOMIC ? The rtw_os_recv_indicate_pkt() is always called from an interrupt handler. It'd be better to indicate you know that in the changelog as the subject and changelog just shows removing wrappers and the patch code does not agree with that. Yes, it's right. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging:r8723bs: remove wrappers around skb_clone() and remove unnecessary in_interrupt() call
Wrappers around skb_clone() do not simplify the driver code. The skb_clone() is always called from an interrupt handler, so use GFP_ATOMIC allocation only. Signed-off-by: Ivan Safonov --- Changes in v2: - in_interrupt() removal has been described. drivers/staging/rtl8723bs/include/osdep_service.h | 3 --- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 5 - drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h index 5f681899bbec..be34e279670b 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service.h +++ b/drivers/staging/rtl8723bs/include/osdep_service.h @@ -94,7 +94,6 @@ void _kfree(u8 *pbuf, u32 sz); struct sk_buff *_rtw_skb_alloc(u32 sz); struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb); -struct sk_buff *_rtw_skb_clone(struct sk_buff *skb); int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_malloc(sz) _rtw_malloc((sz)) @@ -103,9 +102,7 @@ int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_skb_alloc(size) _rtw_skb_alloc((size)) #define rtw_skb_alloc_f(size, mstat_f) _rtw_skb_alloc((size)) #define rtw_skb_copy(skb) _rtw_skb_copy((skb)) -#define rtw_skb_clone(skb) _rtw_skb_clone((skb)) #define rtw_skb_copy_f(skb, mstat_f) _rtw_skb_copy((skb)) -#define rtw_skb_clone_f(skb, mstat_f) _rtw_skb_clone((skb)) #define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb) extern void _rtw_init_queue(struct __queue *pqueue); diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 4238209ec175..6d443197a0cf 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -47,11 +47,6 @@ inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb) return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); } -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) -{ - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); -} - inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) { skb->dev = ndev; diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index eb4d1c3008fe..b2a1bbb30df6 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); - pskb2 = rtw_skb_clone(pkt); + pskb2 = skb_clone(pkt, GFP_ATOMIC); } else { psta = rtw_get_stainfo(pstapriv, pattrib->dst); } -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: fbtft: fb_st7789v: make HSD20_IPS numeric and not a string
Hi Colin/Greg. On Thu, May 21, 2020 at 02:50:38PM +0100, Colin King wrote: > From: Colin Ian King > > Currently HSD20_IPS is defined as "true" and will always result in a > non-zero result even if it is defined as "false" because it is an array > and that will never be zero. Fix this by defining it as an integer 1 > rather than a literal string. > > Addessses-Coverity: ("Array compared against 0") > Fixes: f03c9b788472 ("staging: fbtft: fb_st7789v: Initialize the Display") > Signed-off-by: Colin Ian King > --- > drivers/staging/fbtft/fb_st7789v.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/fbtft/fb_st7789v.c > b/drivers/staging/fbtft/fb_st7789v.c > index ebc17e05ecd0..3a280cc1892c 100644 > --- a/drivers/staging/fbtft/fb_st7789v.c > +++ b/drivers/staging/fbtft/fb_st7789v.c > @@ -24,7 +24,7 @@ > "D0 05 0A 09 08 05 2E 44 45 0F 17 16 2B 33\n" \ > "D0 05 0A 09 08 05 2E 43 45 0F 16 16 2B 33" > > -#define HSD20_IPS "true" > +#define HSD20_IPS 1 > > /** > * enum st7789v_command - ST7789V display controller commands Patch does not apply to drm-misc-next, seems to be a staging thing. So do not expext the DRM people to pick it up. Sam > -- > 2.25.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone()
On Sun, 2020-05-31 at 20:28 +0300, Ivan Safonov wrote: > On 5/31/20 7:15 PM, Joe Perches wrote: > > On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote: > > > Wrappers around skb_clone() do not simplify the driver code. > > [] > > > -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) > > > -{ > > > - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); > > > -} > > > - > > [] > > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > > b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > [] > > > @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter > > > *padapter, _pkt *pkt, struct rx_pkt > > > if (memcmp(pattrib->dst, > > > myid(&padapter->eeprompriv), ETH_ALEN)) { > > > if (bmcast) { > > > psta = > > > rtw_get_bcmc_stainfo(padapter); > > > - pskb2 = rtw_skb_clone(pkt); > > > + pskb2 = skb_clone(pkt, GFP_ATOMIC); > > > > Why make every clone allocation GFP_ATOMIC ? > > The rtw_os_recv_indicate_pkt() is always called from an interrupt handler. It'd be better to indicate you know that in the changelog as the subject and changelog just shows removing wrappers and the patch code does not agree with that. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: gasket: replace symbolic permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .attr = __ATTR(_name, S_IRUGO, _show_function, NULL), \ warning detected by checkpatch.pl Signed-off-by: Rodolfo C. Villordo --- drivers/staging/gasket/gasket_sysfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_sysfs.h b/drivers/staging/gasket/gasket_sysfs.h index ab5aa351d555..d5e167dfbe76 100644 --- a/drivers/staging/gasket/gasket_sysfs.h +++ b/drivers/staging/gasket/gasket_sysfs.h @@ -71,7 +71,7 @@ struct gasket_sysfs_attribute { #define GASKET_SYSFS_RO(_name, _show_function, _attr_type) \ { \ - .attr = __ATTR(_name, S_IRUGO, _show_function, NULL), \ + .attr = __ATTR(_name, 0444, _show_function, NULL), \ .data.attr_type = _attr_type \ } -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()
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 more information. When pin_user_pages() returns numbers of partially mapped pages, those pages were not unpinned as part of error handling. Fixed it as part of this patch. Hi Souptick, btw, Bharath (+cc) attempted to do the "put" side of this, last year. That got as far as a v4 patch [1], and then I asked him to let me put it into my tree. But then it didn't directly apply anymore after the whole design moved to pin+unpin, and so here we are now. If Bharath is still doing kernel work, you might offer him a Co-Developed-by: tag (see https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html). Anyway, I'd recommend splitting the bug fix(es) into it at least one separate patch. That's a "best practice", and I don't see any reason not to do it here, even though the bugs are not huge. Also I think there may be more than one bug to fix, because I just noticed that the pre-existing code is doing set_page_dirty(), when it should be doing set_page_dirty_lock(). See below. [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 testing help is much appriciated. drivers/staging/kpc2000/kpc_dma/fileops.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c index 8975346..29bab13 100644 --- a/drivers/staging/kpc2000/kpc_dma/fileops.c +++ b/drivers/staging/kpc2000/kpc_dma/fileops.c @@ -48,6 +48,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv, u64 card_addr; u64 dma_addr; u64 user_ctl; + int nr_pages = 0; Probably best to correct the "rv" type as well: it should be an int, rather than a long. ldev = priv->ldev; @@ -76,13 +77,15 @@ static int kpc_dma_transfer(struct dev_private_data *priv, // Lock the user buffer pages in memory, and hold on to the page pointers (for the sglist) mmap_read_lock(current->mm); /* get memory map semaphore */ - rv = get_user_pages(iov_base, acd->page_count, FOLL_TOUCH | FOLL_WRITE | FOLL_GET, acd->user_pages, NULL); + rv = pin_user_pages(iov_base, acd->page_count, FOLL_TOUCH | FOLL_WRITE, acd->user_pages, NULL); mmap_read_unlock(current->mm);/* release the semaphore */ if (rv != acd->page_count) { - dev_err(&priv->ldev->pldev->dev, "Couldn't get_user_pages (%ld)\n", rv); + dev_err(&priv->ldev->pldev->dev, "Couldn't pin_user_pages (%ld)\n", rv); + nr_pages = rv; goto err_get_user_pages; } + nr_pages = acd->page_count; // Allocate and setup the sg_table (scatterlist entries) rv = sg_alloc_table_from_pages(&acd->sgt, acd->user_pages, acd->page_count, iov_base & (PAGE_SIZE - 1), iov_len, GFP_KERNEL); if (rv) { @@ -189,10 +192,9 @@ static int kpc_dma_transfer(struct dev_private_data *priv, sg_free_table(&acd->sgt); err_dma_map_sg: err_alloc_sg_table: So now we end up with two unnecessary labels. Probably best to delete two of these three and name the remaining one appropriately: err_dma_map_sg: err_alloc_sg_table: err_get_user_pages: - for (i = 0 ; i < acd->page_count ; i++) - put_page(acd->user_pages[i]); - err_get_user_pages: + if (nr_pages > 0) + unpin_user_pages(acd->user_pages, nr_pages); kfree(acd->user_pages); err_alloc_userpages: kfree(acd); @@ -217,8 +219,7 @@ void transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags) There is code up here (not shown in this diff), that does a set_page_dirty(). First of all, that should be set_page_dirty_lock(), and second, maybe (or maybe not) it can all be done after the dma_unmap_sg(), at the same time as the unpin, via unpin_user_pages_dirty_lock(). In fact, it's misleading at best to leave those pages mapped, because 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. (Remember that writeback attempts can be happening concurrently with all of this, and writeback is deeply involved with page dirtiness.) I remember Bharath wrestled with this in an earlier conversion attempt (back when we were only converting the "put_page" side of things), let me see if I can dig up that email thread for some guidance...OK, in [1] it appears that everyone finally settled on keeping the PageReserved check, but OK to move everything below the dma_unmap_sg() call. [1] https://lore.kernel.org/r/20190720173214.GA4250@bharath12345-Insp
Re: [PATCH v11 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver
On Fri, May 15, 2020 at 2:53 PM Xin Ji wrote: > + > +static int anx7625_bridge_attach(struct drm_bridge *bridge) Latest drm_bridge api: int (*attach)(struct drm_bridge *bridge, enum drm_bridge_attach_flags flags); https://elixir.bootlin.com/linux/v5.7-rc7/source/include/drm/drm_bridge.h#L70 > +{ > + struct anx7625_data *ctx = bridge_to_anx7625(bridge); > + int err; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing] BUILD SUCCESS 77f55d1305c11fb729b88f2c3f7881ba0831fa6f
alldefconfig xtensa common_defconfig i386 allnoconfig i386 allyesconfig i386defconfig i386 debian-10.3 ia64 allmodconfig ia64defconfig ia64 allnoconfig ia64 allyesconfig m68k allmodconfig m68k allnoconfig m68k sun3_defconfig m68kdefconfig nios2 defconfig nios2allyesconfig c6x allyesconfig c6x allnoconfig openrisc allyesconfig nds32 defconfig csky allyesconfig cskydefconfig alpha defconfig alphaallyesconfig h8300allmodconfig arc defconfig arc allyesconfig shallnoconfig microblazeallnoconfig mips allnoconfig mips allmodconfig parisc defconfig parisc allyesconfig parisc allmodconfig powerpc allyesconfig powerpc rhel-kconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a004-20200529 i386 randconfig-a001-20200529 i386 randconfig-a002-20200529 i386 randconfig-a006-20200529 i386 randconfig-a003-20200529 i386 randconfig-a005-20200529 i386 randconfig-a004-20200531 i386 randconfig-a003-20200531 i386 randconfig-a006-20200531 i386 randconfig-a002-20200531 i386 randconfig-a005-20200531 i386 randconfig-a001-20200531 x86_64 randconfig-a002-20200529 x86_64 randconfig-a006-20200529 x86_64 randconfig-a005-20200529 x86_64 randconfig-a001-20200529 x86_64 randconfig-a004-20200529 x86_64 randconfig-a003-20200529 i386 randconfig-a013-20200529 i386 randconfig-a011-20200529 i386 randconfig-a012-20200529 i386 randconfig-a015-20200529 i386 randconfig-a016-20200529 i386 randconfig-a014-20200529 i386 randconfig-a013-20200531 i386 randconfig-a012-20200531 i386 randconfig-a015-20200531 i386 randconfig-a011-20200531 i386 randconfig-a016-20200531 i386 randconfig-a014-20200531 riscvallyesconfig riscv allnoconfig riscvallmodconfig s390 allyesconfig s390 allnoconfig s390 allmodconfig s390defconfig sparcallyesconfig sparc defconfig sparc64 defconfig sparc64 allnoconfig sparc64 allmodconfig um allmodconfig umallnoconfig um defconfig um allyesconfig x86_64 rhel x86_64 rhel-7.6 x86_64rhel-7.6-kselftests x86_64 rhel-7.2-clear x86_64lkp x86_64 fedora-25 x86_64 kexec --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[driver-core:readfile] BUILD SUCCESS fcc5337507797b60284d349f00dda426aa053f1f
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git readfile branch HEAD: fcc5337507797b60284d349f00dda426aa053f1f selftests: add readfile(2) selftests elapsed time: 3734m configs tested: 142 configs skipped: 7 The following configs have been built successfully. More configs may be tested in the coming days. arm defconfig arm allyesconfig arm allmodconfig arm allnoconfig arm64allyesconfig arm64 defconfig arm64allmodconfig arm64 allnoconfig arm pxa3xx_defconfig arm palmz72_defconfig shshmin_defconfig ia64zx1_defconfig riscv rv32_defconfig um x86_64_defconfig m68k m5249evb_defconfig sh sh7770_generic_defconfig arm vf610m4_defconfig armtrizeps4_defconfig powerpc pasemi_defconfig sparc sparc64_defconfig mips decstation_64_defconfig mips ath79_defconfig shsh7763rdp_defconfig s390 allnoconfig mips tb0226_defconfig m68k multi_defconfig h8300allyesconfig sh sh03_defconfig sh se7343_defconfig arm badge4_defconfig sh se7780_defconfig sh rsk7269_defconfig ia64generic_defconfig mips allyesconfig xtensa allyesconfig sh sdk7780_defconfig mipsjmr3927_defconfig riscv defconfig sh cayman_defconfig arm ebsa110_defconfig armlart_defconfig sh microdev_defconfig x86_64 defconfig armoxnas_v6_defconfig powerpcadder875_defconfig mipsar7_defconfig ia64 allnoconfig armkeystone_defconfig arm viper_defconfig armpleb_defconfig sh espt_defconfig arm omap1_defconfig arm spear13xx_defconfig sparc64 allyesconfig microblazenommu_defconfig arc axs101_defconfig powerpc maple_defconfig nds32 allnoconfig sh allmodconfig powerpc defconfig arc tb10x_defconfig armmvebu_v7_defconfig powerpcmpc7448_hpc2_defconfig xtensa defconfig i386 allnoconfig i386 allyesconfig i386defconfig i386 debian-10.3 ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68k allnoconfig m68k sun3_defconfig m68kdefconfig m68k allyesconfig nios2 defconfig nios2allyesconfig openriscdefconfig c6x allyesconfig c6x allnoconfig openrisc allyesconfig nds32 defconfig csky allyesconfig cskydefconfig alpha defconfig alphaallyesconfig h8300allmodconfig arc defconfig arc allyesconfig shallnoconfig microblazeallnoconfig mips allnoconfig mips allmodconfig pariscallnoconfig parisc defconfig parisc allyesconfig parisc allmodconfig powerpc allyesconfig powerpc rhel-kconfig powerpc allmodconfig pow
Cursos Bonificables JUNIO 2020 (Empleados activos y en ERTE)
Cursos Bonificables JUNIO 2020 (Empleados activos y en ERTE) Buenos días Se encuentra abierto el plazo de inscripción de Cursos Bonificables para empleados en activo y en situación de ERTE (JUNIO 2020) Todos los cursos son totalmente Bonificables con cargo al Crédito de Formación 2020 que dispone vuestra empresa. Se realizan en modalidad individual E-learning a través de la plataforma web y con total flexibilidad horaria. Deseáis que os mandemos la información? Saludos cordiales. Alex Pons Director departamento formación. FOESCO Formación Estatal Continua. Entidad Organizadora: B171823AP www.foesco.com e-mail: cur...@foesco.net Tel: 910 323 794 (Horario de 9h a 15h y de 17h a 20h de Lunes a Viernes) FOESCO ofrece formación a empresas y trabajadores en activo a través de cursos bonificados por la Fundación Estatal para la Formación en el Empleo (antiguo FORCEM) que gestiona las acciones formativas de FORMACIÓN CONTINUA para trabajadores y se rige por la ley 30/2015 de 9 de Septiembre. Si no desea recibir mas información de FOESCO responda a este correo con la palabra BAJA en el asunto. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: qlge: qlge_main.c: fixed spaces coding style issues
On 2020-05-29 17:17 +0200, Jil Rouceau wrote: > Fixed the missing spaces before and after binary operators. > > Signed-off-by: Jil Rouceau This patch does not apply cleanly. I think your base tree is missing commit ec269f1250c6 ("staging: qlge: Remove unnecessary spaces in qlge_main.c"). ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[driver-core:debugfs_cleanup] BUILD SUCCESS ffba49a91bd0f50ced6bde4746301519880289b5
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup branch HEAD: ffba49a91bd0f50ced6bde4746301519880289b5 debugfs: remove return value of debugfs_create_devm_seqfile() elapsed time: 5360m configs tested: 79 configs skipped: 1 The following configs have been built successfully. More configs may be tested in the coming days. arm64allyesconfig arm64 defconfig arm64allmodconfig arm64 allnoconfig arm defconfig arm allyesconfig arm allmodconfig arm allnoconfig i386 allnoconfig i386 allyesconfig i386defconfig i386 debian-10.3 ia64 allmodconfig ia64defconfig ia64 allnoconfig ia64 allyesconfig m68k allmodconfig m68k allnoconfig m68k sun3_defconfig m68kdefconfig m68k allyesconfig nios2 defconfig nios2allyesconfig openriscdefconfig c6x allyesconfig c6x allnoconfig openrisc allyesconfig nds32 defconfig nds32 allnoconfig csky allyesconfig cskydefconfig alpha defconfig alphaallyesconfig xtensa allyesconfig h8300allyesconfig h8300allmodconfig xtensa defconfig arc defconfig arc allyesconfig sh allmodconfig shallnoconfig microblazeallnoconfig mips allyesconfig mips allnoconfig mips allmodconfig pariscallnoconfig parisc defconfig parisc allyesconfig parisc allmodconfig powerpc defconfig powerpc allyesconfig powerpc rhel-kconfig powerpc allmodconfig powerpc allnoconfig riscvallyesconfig riscv allnoconfig riscv defconfig riscvallmodconfig s390 allyesconfig s390 allnoconfig s390 allmodconfig s390defconfig sparcallyesconfig sparc defconfig sparc64 defconfig sparc64 allnoconfig sparc64 allyesconfig sparc64 allmodconfig umallnoconfig um defconfig um allmodconfig um allyesconfig x86_64 rhel x86_64 rhel-7.6 x86_64rhel-7.6-kselftests x86_64 rhel-7.2-clear x86_64lkp x86_64 fedora-25 x86_64 kexec --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel