Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: ixp4xx_hss: use dma_pool_zalloc
@ 2021-07-25 14:42 Jason Wang
2021-07-26 13:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2021-07-25 14:42 UTC (permalink / raw)
To: khalasa; +Cc: davem, kuba, netdev, linux-kernel, Jason Wang
The dma_pool_zalloc combines dma_pool_alloc/memset. Therefore, the
dma_pool_alloc/memset can be replaced with dma_pool_zalloc which is
more compact.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
drivers/net/wan/ixp4xx_hss.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 3c51ab239fb2..2cebbfca0bd1 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -975,11 +975,10 @@ static int init_hdlc_queues(struct port *port)
return -ENOMEM;
}
- port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
+ port->desc_tab = dma_pool_zalloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys);
if (!port->desc_tab)
return -ENOMEM;
- memset(port->desc_tab, 0, POOL_ALLOC_SIZE);
memset(port->rx_buff_tab, 0, sizeof(port->rx_buff_tab)); /* tables */
memset(port->tx_buff_tab, 0, sizeof(port->tx_buff_tab));
--
2.32.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ixp4xx_hss: use dma_pool_zalloc
2021-07-25 14:42 [PATCH] net: ixp4xx_hss: use dma_pool_zalloc Jason Wang
@ 2021-07-26 13:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-26 13:20 UTC (permalink / raw)
To: Jason Wang; +Cc: khalasa, davem, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sun, 25 Jul 2021 22:42:21 +0800 you wrote:
> The dma_pool_zalloc combines dma_pool_alloc/memset. Therefore, the
> dma_pool_alloc/memset can be replaced with dma_pool_zalloc which is
> more compact.
>
> Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
> ---
> drivers/net/wan/ixp4xx_hss.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Here is the summary with links:
- net: ixp4xx_hss: use dma_pool_zalloc
https://git.kernel.org/netdev/net-next/c/af996031e154
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-26 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 14:42 [PATCH] net: ixp4xx_hss: use dma_pool_zalloc Jason Wang
2021-07-26 13:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).