[PATCH] brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough

2021-04-19 Thread Christophe JAILLET
A workqueue is not atomic, so constraints can be relaxed here. GFP_KERNEL can be used instead of GFP_ATOMIC. Signed-off-by: Christophe JAILLET --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless

Re: [PATCH 1/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

2021-04-18 Thread Marion et Christophe JAILLET
  > Message du 19/04/21 01:03 > De : "Bart Van Assche" > A : "Christophe JAILLET" , t...@kernel.org, jiangshan...@gmail.com, > sae...@nvidia.com, l...@kernel.org, da...@davemloft.net, k...@kernel.org, > "Tejun Heo" > Copie à : netdev@vger.kern

Re: [PATCH] net/mlx5: Use kasprintf instead of hand-writing it

2021-04-18 Thread Christophe JAILLET
Le 18/04/2021 à 22:03, Bart Van Assche a écrit : On 4/17/21 12:16 AM, Christophe JAILLET wrote: 'kasprintf()' can replace a kmalloc/strcpy/strcat sequence. It is less verbose and avoid the use of a magic number (64). Anyway, the underlying 'alloc_workqueue()' would only kee

[PATCH 2/2] net/mlx5: Simplify workqueue name creation

2021-04-18 Thread Christophe JAILLET
There is no need to explicitly allocate, populate and free some memory just to pass a workqueue name to 'create_singlethread_workqueue()'. This macro can do all this for us, so keep the code simple. Signed-off-by: Christophe JAILLET --- A similar patch has also been sent. It was rep

[PATCH 1/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

2021-04-18 Thread Christophe JAILLET
ying 'alloc_workqueue()' function. This will also allow further code simplification. Suggested-by: Bart Van Assche Signed-off-by: Christophe JAILLET --- include/linux/workqueue.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/workqueu

[PATCH 0/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

2021-04-18 Thread Christophe JAILLET
ying 'alloc_workqueue()' function. This will also allow further code simplification. Patch 1 is the modification of the macro. Patch 2 is an example of simplification possible with this patch Christophe JAILLET (2): workqueue: Have 'alloc_workqueue()' like macros accept a forma

[PATCH] net/mlx5: Use kasprintf instead of hand-writing it

2021-04-17 Thread Christophe JAILLET
'kasprintf()' can replace a kmalloc/strcpy/strcat sequence. It is less verbose and avoid the use of a magic number (64). Anyway, the underlying 'alloc_workqueue()' would only keep the 24 first chars (i.e. sizeof(struct workqueue_struct->name) = WQ_NAME_LEN). Signed-off

[PATCH] net: davicom: Fix regulator not turned off on failed probe

2021-04-11 Thread Christophe JAILLET
dm9000") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/davicom/dm9000.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index 252adfa5d837..8a9096aa85cd 100644 --- a/drivers/

[PATCH] rtl8xxxu: Simplify locking of a skb list accesses

2021-04-05 Thread Christophe JAILLET
The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() and __skb_dequeue() calls. Use the lock provided in the skb itself and call skb_queue_tail() and skb_dequeue(). These functions already include the correct locking. Signed-off-by: Christophe JAILLET --- d

[PATCH] rtlwifi: Simplify locking of a skb list accesses

2021-04-05 Thread Christophe JAILLET
The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() and __skb_dequeue() calls. Use the lock provided in the skb itself and call skb_queue_tail() and skb_dequeue(). These functions already include the correct locking. Signed-off-by: Christophe JAILLET --- d

[PATCH 1/2] qede: Remove a erroneous ++ in 'qede_rx_build_jumbo()'

2021-04-04 Thread Christophe JAILLET
ill_page_desc()'. So axe this post-increment to avoid confusion. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/

[PATCH 2/2] qede: Use 'skb_add_rx_frag()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/q

[PATCH] sfc: Use 'skb_add_rx_frag()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET --- UNTESTED. Compile tested only The 'skb->truesize' computation is likely to be slightly slower (n additions hidden in 's

[PATCH] ibmvnic: Use 'skb_frag_address()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
'page_address(skb_frag_page()) + skb_frag_off()' can be replaced by an equivalent 'skb_frag_address()' which is less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/ibm/ibmvnic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/

[PATCH] net: openvswitch: Use 'skb_push_rcsum()' instead of hand coding it

2021-04-04 Thread Christophe JAILLET
'skb_push()'/'skb_postpush_rcsum()' can be replaced by an equivalent 'skb_push_rcsum()' which is less verbose. Signed-off-by: Christophe JAILLET --- net/openvswitch/conntrack.c| 6 ++ net/openvswitch/vport-netdev.c | 7 +++ 2 files changed, 5 inser

[PATCH] net: ag71xx: Slightly simplify 'ag71xx_rx_packets()'

2021-04-03 Thread Christophe JAILLET
There is no need to use 'list_for_each_entry_safe' here, as nothing is removed from the list in the 'for' loop. Use 'list_for_each_entry' instead, it is slightly less verbose. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/atheros/ag71xx.c | 4 ++--

[PATCH] carl9170: remove get_tid_h

2021-04-02 Thread Christophe JAILLET
'get_tid_h()' is the same as 'ieee80211_get_tid()'. So this function can be removed to save a few lines of code. Signed-off-by: Christophe JAILLET --- drivers/net/wireless/ath/carl9170/carl9170.h | 7 +-- drivers/net/wireless/ath/carl9170/tx.c | 2 +- 2 files c

[PATCH] rtlwifi: remove rtl_get_tid_h

2021-04-02 Thread Christophe JAILLET
'rtl_get_tid_h()' is the same as 'ieee80211_get_tid()'. So this function can be removed to save a line of code. Signed-off-by: Christophe JAILLET --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/

[PATCH resend] e100: switch from 'pci_' to 'dma_' API

2021-01-28 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Tested-by: Aaron Brown --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-

[PATCH v2] iwlwifi: mvm: Fix an error handling path in 'iwl_mvm_wowlan_config_key_params()'

2021-01-24 Thread Christophe JAILLET
If the 'cmd_ver' check fails, we must release some memory as already done in all the other error handling paths of this function. Fixes: 9e3c39361a30 ("iwlwifi: mvm: support new KEK KCK api") Signed-off-by: Christophe JAILLET --- v1->v2: Fix the subject --- drivers/net

Re: [PATCH] iwlwifi: mvm: Fix an error handling path in 'ebu_dma_start()'

2021-01-24 Thread Christophe JAILLET
Le 24/01/2021 à 08:56, Christophe JAILLET a écrit : If the 'cmd_ver' check fails, we must release some memory as already done in all the other error handling paths of this function. Fixes: 9e3c39361a30 ("iwlwifi: mvm: support new KEK KCK api") Signed-off-by: Christophe JA

[PATCH] iwlwifi: mvm: Fix an error handling path in 'ebu_dma_start()'

2021-01-24 Thread Christophe JAILLET
If the 'cmd_ver' check fails, we must release some memory as already done in all the other error handling paths of this function. Fixes: 9e3c39361a30 ("iwlwifi: mvm: support new KEK KCK api") Signed-off-by: Christophe JAILLET --- drivers/net/wireless/intel/iwlwifi/mvm/d3.

[PATCH] net/qla3xxx: switch from 'pci_' to 'dma_' API

2021-01-17 Thread Christophe JAILLET
r_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@

[PATCH] mlxsw: pci: switch from 'pci_' to 'dma_' API

2021-01-14 Thread Christophe JAILLET
p;e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_

[PATCH] netxen_nic: switch from 'pci_' to 'dma_' API

2021-01-13 Thread Christophe JAILLET
e2; @@ -pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML

Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-15 Thread Christophe JAILLET
Le 15/12/2020 à 20:35, Dan Carpenter a écrit : On Tue, Dec 15, 2020 at 08:08:15PM +0100, Maxime Ripard wrote: On Tue, Dec 15, 2020 at 07:18:48PM +0100, Christophe JAILLET wrote: Le 15/12/2020 à 12:37, Maxime Ripard a écrit : On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote: On

Re: [PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-15 Thread Christophe JAILLET
Le 15/12/2020 à 12:37, Maxime Ripard a écrit : On Tue, Dec 15, 2020 at 12:11:53PM +0300, Dan Carpenter wrote: On Tue, Dec 15, 2020 at 09:56:55AM +0100, Maxime Ripard wrote: Hi, On Mon, Dec 14, 2020 at 09:21:17PM +0100, Christophe JAILLET wrote: 'irq_of_parse_and_map()' should be b

[PATCH] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-14 Thread Christophe JAILLET
ethernet driver found on Allwinner A10 SoC's") Signed-off-by: Christophe JAILLET --- Please, carefully check the remove function, I'm not always confident by the correct order when releasing resources. This is sometimes tricky. --- drivers/net/ethernet/allwinner/sun4i-emac.c | 7 +++

Re: [PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-14 Thread Christophe JAILLET
Le 14/12/2020 à 12:48, Dan Carpenter a écrit : On Sun, Dec 13, 2020 at 12:48:38PM +0100, Christophe JAILLET wrote: In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. This

[PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-13 Thread Christophe JAILLET
In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Christophe JAILLET

[PATCH] net: bcmgenet: Fix a resource leak in an error handling path in the probe functin

2020-12-12 Thread Christophe JAILLET
If the 'register_netdev()' call fails, we must undo a previous 'bcmgenet_mii_init()' call. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Christophe JAILLET --- The missing 'bcmgenet_mii_exit()' call is added here, instead o

[PATCH] dpaa2-mac: Add a missing of_node_put after of_device_is_available

2020-12-06 Thread Christophe JAILLET
Add an 'of_node_put()' call when a tested device node is not available. Fixes:94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] mlxsw: switch from 'pci_' to 'dma_' API

2020-11-30 Thread Christophe JAILLET
Le 29/11/2020 à 22:46, Heiner Kallweit a écrit : Am 29.11.2020 um 22:17 schrieb Christophe JAILLET: @@ -1817,17 +1817,17 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_pci_request_regions; } - err = pci_set_dma_mask(pdev

[PATCH] mlxsw: switch from 'pci_' to 'dma_' API

2020-11-29 Thread Christophe JAILLET
@@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ ex

[PATCH] mwl8k: switch from 'pci_' to 'dma_' API

2020-11-29 Thread Christophe JAILLET
r_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1

[PATCH] sctp: Fix some typo

2020-11-22 Thread Christophe JAILLET
s/tranport/transport/ Signed-off-by: Christophe JAILLET --- net/sctp/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 60fcf31cdcfb..bf0ac467e757 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c

[PATCH] ath11k: Fix an error handling path

2020-11-22 Thread Christophe JAILLET
If 'kzalloc' fails, we must return an error code. While at it, remove a useless initialization of 'err' which could hide the issue. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Christophe JAILLET --- drivers/net

[PATCH 2/2] ath10k: Release some resources in an error handling path

2020-11-22 Thread Christophe JAILLET
Should an error occur after calling 'ath10k_usb_create()', it should be undone by a corresponding 'ath10k_usb_destroy()' call Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET --- This patch is speculative and compile tested o

[PATCH 1/2] ath10k: Fix an error handling path

2020-11-22 Thread Christophe JAILLET
If 'ath10k_usb_create()' fails, we should release some resources and report an error instead of silently continuing. Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET --- drivers/net/wireless/ath/ath10k/usb.c | 2 ++ 1 file changed, 2

[PATCH 1/2] net: pch_gbe: Use dma_set_mask_and_coherent to simplify code

2020-11-21 Thread Christophe JAILLET
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET --- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 14 -- 1 fil

[PATCH 2/2] net: pch_gbe: Use 'dma_free_coherent()' to undo 'dma_alloc_coherent()'

2020-11-21 Thread Christophe JAILLET
Memory allocation are done with 'dma_alloc_coherent()'. Be consistent and use 'dma_free_coherent()' to free the corresponding memory. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 10 ++ 1 file changed, 6 insertions(+),

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-17 Thread Marion & Christophe JAILLET
Le 17/11/2020 à 03:55, Zhang Changzhong a écrit : Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") Hi, should it have any importance, the Fixes tag is wrong

Re: [PATCH net] atl1e: fix error return code in atl1e_probe()

2020-11-17 Thread Marion & Christophe JAILLET
Le 17/11/2020 à 03:57, Zhang Changzhong a écrit : Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") Hi, should it have any importance, the Fixes tag is wrong

[PATCH] net: typhoon: Fix a typo Typoon --> Typhoon

2020-10-02 Thread Christophe JAILLET
s/Typoon/Typhoon/ Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/3com/typhoon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/3com/typhoon.h b/drivers/net/ethernet/3com/typhoon.h index 2f634c64d5d1..38e6dcab4e94 100644 --- a/drivers/net

[PATCH] tulip: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=15874567830

[PATCH] tulip: de2104x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If

[PATCH] tulip: dmfe: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

[PATCH] tulip: uli526x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

Re: [PATCH] net: dl2k: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
Le 13/09/2020 à 08:55, Leon Romanovsky a écrit : On Sun, Sep 13, 2020 at 08:14:17AM +0200, Christophe JAILLET wrote: > [...] @@ -504,9 +510,8 @@ static int alloc_list(struct net_device *dev) sizeof(struct netdev_desc)); /* Rubi

[PATCH] tulip: windbond-840: Fix a debug message

2020-09-13 Thread Christophe JAILLET
'w89c840_open()' is incorrectly reported in a debug message. Use __func__ instead. While at it, fix some style issue in the same function. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/dec/tulip/winbond-840.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

[PATCH] tulip: windbond-840: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
or(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JA

[PATCH] net: dl2k: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&a

[PATCH V2] natsemi: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
; @@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1

[PATCH] natsemi: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
g_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2)

Re: [PATCH] tlan: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
Le 12/09/2020 à 12:25, Christophe JAILLET a écrit : The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated

[PATCH] net: tehuti: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
ice(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2;

[PATCH] rocker: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
sk(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=

[PATCH] sc92031: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
mp;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph H

[PATCH] tlan: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
c_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1,

[PATCH] tlan: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
c_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1,

[PATCH] net: tc35815: switch from 'pci_' to 'dma_' API

2020-09-08 Thread Christophe JAILLET
1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLE

[PATCH] hippi: switch from 'pci_' to 'dma_' API

2020-09-08 Thread Christophe JAILLET
; @@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expressi

[PATCH] airo: switch from 'pci_' to 'dma_' API

2020-09-07 Thread Christophe JAILLET
ing_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on

[PATCH v2] rtlwifi: switch from 'pci_' to 'dma_' API

2020-09-07 Thread Christophe JAILLET
ask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745

[PATCH] enic: switch from 'pci_' to 'dma_' API

2020-09-06 Thread Christophe JAILLET
ice(e1, e2, e3, e4) +dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ -pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) +dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&am

[PATCH RESEND] smsc9420: switch from 'pci_' to 'dma_' API

2020-09-03 Thread Christophe JAILLET
-pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=ker

[PATCH RESEND] epic100: switch from 'pci_' to 'dma_' API

2020-09-03 Thread Christophe JAILLET
dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=15874

[PATCH] chelsio: switch from 'pci_' to 'dma_' API

2020-08-23 Thread Christophe JAILLET
; @@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expressi

[PATCH] net: atheros: switch from 'pci_' to 'dma_' API

2020-08-23 Thread Christophe JAILLET
e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitor

[PATCH] starfire: switch from 'pci_' to 'dma_' API

2020-08-22 Thread Christophe JAILLET
@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev,

[PATCH] typhoon: switch from 'pci_' to 'dma_' API

2020-08-22 Thread Christophe JAILLET
1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET -

Re: [PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-20 Thread Christophe JAILLET
Le 06/08/2020 à 23:23, David Miller a écrit : From: Christophe JAILLET Date: Thu, 6 Aug 2020 22:19:35 +0200 The wrappers in include/linux/pci-dma-compat.h should go away. Christophe, the net-next tree is closed so I'd like to ask that you defer submitting these conversion patches unti

[PATCH] rtw88: switch from 'pci_' to 'dma_' API

2020-08-20 Thread Christophe JAILLET
-pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1

[PATCH] rtlwifi: switch from 'pci_' to 'dma_' API

2020-08-20 Thread Christophe JAILLET
ask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

[PATCH RESEND] rtl818x_pci: switch from 'pci_' to 'dma_' API

2020-08-20 Thread Christophe JAILLET
) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->

[PATCH] rtl818x_pci: switch from 'pci_' to 'dma_' API

2020-08-19 Thread Christophe JAILLET
) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->

[PATCH] mwifiex: Clean up some err and dbg messages

2020-08-19 Thread Christophe JAILLET
- s/unsigned int/u32/ to be consistent between functions - align some code Signed-off-by: Christophe JAILLET --- drivers/net/wireless/marvell/mwifiex/pcie.c | 25 + 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b

[PATCH] mwifiex: switch from 'pci_' to 'dma_' API

2020-08-19 Thread Christophe JAILLET
-pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML:

[PATCH] mwifiex: Do not use GFP_KERNEL in atomic context

2020-08-09 Thread Christophe JAILLET
nstead of GFP_KERNEL when memory is allocated in 'mwifiex_parse_single_response_buf()'. Fixes: 7c6fa2a843c5 ("mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API") or Fixes: 601216e12c65e ("mwifiex: process RX packets in SDIO IRQ thread directly") Signed-off-by

Re: [PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
Le 06/08/2020 à 23:23, David Miller a écrit : From: Christophe JAILLET Date: Thu, 6 Aug 2020 22:19:35 +0200 The wrappers in include/linux/pci-dma-compat.h should go away. Christophe, the net-next tree is closed so I'd like to ask that you defer submitting these conversion patches unti

[PATCH] adm8211: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig

[PATCH] smsc9420: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
-pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=ke

[PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 --

[PATCH] farsync: switch from 'pci_' to 'dma_' API

2020-08-04 Thread Christophe JAILLET
@@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 ---

[PATCH] wan: wanxl: switch from 'pci_' to 'dma_' API

2020-08-04 Thread Christophe JAILLET
@@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig

Re: [PATCH] gve: Fix the size used in a 'dma_free_coherent()' call

2020-08-03 Thread Christophe JAILLET
Le 03/08/2020 à 21:35, Joe Perches a écrit : On Mon, 2020-08-03 at 21:19 +0200, Christophe JAILLET wrote: Le 03/08/2020 à 17:41, Jakub Kicinski a écrit : On Sun, 2 Aug 2020 16:15:23 +0200 Christophe JAILLET wrote: Update the size used in 'dma_free_coherent()' in order to match th

Re: [PATCH] gve: Fix the size used in a 'dma_free_coherent()' call

2020-08-03 Thread Christophe JAILLET
Le 03/08/2020 à 17:41, Jakub Kicinski a écrit : On Sun, 2 Aug 2020 16:15:23 +0200 Christophe JAILLET wrote: Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 893ce44df5 ("gve: Add basic dri

[PATCH] gve: Fix the size used in a 'dma_free_coherent()' call

2020-08-02 Thread Christophe JAILLET
Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 893ce44df5 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: Christophe JAILLET --- drivers/net/ethern

[PATCH 2/2] net: spider_net: Remove a useless memset

2020-08-02 Thread Christophe JAILLET
Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Signed-off-by: Christophe JAILLET --- NOT compile tested, because I don't have the configuration for that --- dri

[PATCH 1/2] net: spider_net: Fix the size used in a 'dma_free_coherent()' call

2020-08-02 Thread Christophe JAILLET
Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()', in 'spider_net_init_chain()'. Fixes: d4ed8f8d1fb7 ("Spidernet DMA coalescing") Signed-off-by: Christophe JAILLET --- NOT

[PATCH] net: sgi: ioc3-eth: Fix the size used in some 'dma_free_coherent()' calls

2020-08-02 Thread Christophe JAILLET
Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 369a782af0f1 ("net: sgi: ioc3-eth: ensure tx ring is 16k aligned.") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/sgi/ioc3-

[PATCH] ath10k: Fix the size used in a 'dma_free_coherent()' call in an error handling path

2020-08-02 Thread Christophe JAILLET
Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 1863008369ae ("ath10k: fix shadow register implementation for WCN3990") Signed-off-by: Christophe JAILLET --- This patch looks obvious

[PATCH] crypto: hifn_795x - switch from 'pci_' to 'dma_' API

2020-07-27 Thread Christophe JAILLET
@@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4

[PATCH] prism54: switch from 'pci_' to 'dma_' API

2020-07-22 Thread Christophe JAILLET
e3, e4; @@ -pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2)

[PATCH] p54: switch from 'pci_' to 'dma_' API

2020-07-22 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

[PATCH 1/2] ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation

2020-07-22 Thread Christophe JAILLET
llocate()' also calls 'ipw2100_msg_allocate()' which already allocates some memory using GFP_KERNEL. Signed-off-by: Christophe JAILLET --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c

[PATCH 2/2] ipw2x00: switch from 'pci_' to 'dma_' API

2020-07-22 Thread Christophe JAILLET
error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Ch

[PATCH] sis: switch from 'pci_' to 'dma_' API

2020-07-20 Thread Christophe JAILLET
-pci_dma_sync_sg_for_device(e1, e2, e3, e4) +dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @

[PATCH] r6040: switch from 'pci_' to 'dma_' API

2020-07-20 Thread Christophe JAILLET
a_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post

[PATCH] net: packetengines: switch from 'pci_' to 'dma_' API

2020-07-20 Thread Christophe JAILLET
ession e1, e2; @@ -pci_dma_mapping_error(e1, e2) +dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-

  1   2   3   >