net: wan: Use dma_pool_zalloc
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 20161203091447.GA5231@jordon-HP-15-Notebook-PC
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Krzysztof Hałasa
Quoted 15 lines · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memsetSigned-off-by Souptick joarder <[email protected]>--- drivers/net/wan/ixp4xx_hss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/net/wan/ixp4xx_hss.c +0
-0@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; }
Quoted 11 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 8 lines
drivers/net/wan/ixp4xx_hss.c +2
-3-if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Including netdev mailing list based as requested.
Quoted 7 lines
Acked-by Krzysztof Halasa <[email protected]>--
Krzysztof HalasaIndustrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland
Quoted 30 lines · Souptick Joarder
Quoted 17 lines · Krzysztof Hałasa
Quoted 15 lines · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memsetSigned-off-by Souptick joarder <[email protected]>--- drivers/net/wan/ixp4xx_hss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/net/wan/ixp4xx_hss.c +0
-0@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; }Quoted 11 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 8 lines
drivers/net/wan/ixp4xx_hss.c +2
-3-if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Quoted 9 lines
Including netdev mailing list based as requested.
Quoted 7 lines
Acked-by Krzysztof Halasa <[email protected]>--
Krzysztof HalasaIndustrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland
Any comment on this patch ?
Quoted 5 lines · Souptick Joarder
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Krzysztof Hałasa
Quoted 1 line · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memset
[]
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c +0
-0
[]
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 12 lines
drivers/net/wan/ixp4xx_hss.c +2
-3@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Quoted 2 lines
Quoted 2 lines
Including netdev mailing list based as requested.
Quoted 1 line
Acked-by Krzysztof Halasa <[email protected]>
[]
Quoted 1 line
Any comment on this patch ?
Shouldn't the one in drivers/net/ethernet/xscale/ixp4xx_eth.c also be changed?
Quoted 25 lines · Joe Perches
Quoted 5 lines · Souptick Joarder
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Krzysztof Hałasa
Quoted 1 line · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memset[]
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c +0
-0[]
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 12 lines
drivers/net/wan/ixp4xx_hss.c +2
-3@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Including netdev mailing list based as requested.
Quoted 1 line
Acked-by Krzysztof Halasa <[email protected]>[]
Quoted 1 line
Any comment on this patch ?
Shouldn't the one in
drivers/net/ethernet/xscale/ixp4xx_eth.calso be changed?
Yes, you are right. Do you want me to include it in same patch?
Regards
Souptick
Quoted 31 lines · Souptick Joarder
Quoted 30 lines · Joe Perches
Quoted 5 lines · Souptick Joarder
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Krzysztof Hałasa
Quoted 1 line · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memset[]
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c +0
-0[]
Quoted 18 lines
Quoted 18 lines
Quoted 4 lines
Quoted 4 lines
drivers/net/wan/ixp4xx_hss.c +0
-0@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; }Quoted 11 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 8 lines
drivers/net/wan/ixp4xx_hss.c +2
-3-if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Including netdev mailing list based as requested.
Quoted 1 line
Acked-by Krzysztof Halasa <[email protected]>
Quoted 7 lines
Quoted 5 lines
[]
Quoted 1 line
Any comment on this patch ?
Shouldn't the one in
drivers/net/ethernet/xscale/ixp4xx_eth.calso be changed?Yes, you are right. Do you want me to include it in same patch?
Your choice. I would use a single patch.
Quoted 33 lines · Joe Perches
Quoted 32 lines · Souptick Joarder
Quoted 31 lines · Joe Perches
Quoted 5 lines · Souptick Joarder
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Krzysztof Hałasa
Quoted 1 line · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memset[]
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c +0
-0[]
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 12 lines
drivers/net/wan/ixp4xx_hss.c +2
-3@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Quoted 2 lines
Quoted 2 lines
Including netdev mailing list based as requested.
Quoted 1 line
Acked-by Krzysztof Halasa <[email protected]>[]
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Any comment on this patch ?
Shouldn't the one in
drivers/net/ethernet/xscale/ixp4xx_eth.calso be changed?Yes, you are right. Do you want me to include it in same patch?
Your choice. I would use a single patch.
There are few other places where the same change is applicable. I am planning to put all those changes in a single patch. It includes changes in drivers/net/ethernet/xscale/ixp4xx_eth.c
You can review this patch separately.
Quoted 1 line
Quoted 41 lines · Souptick Joarder
Quoted 40 lines · Joe Perches
Quoted 38 lines · Souptick Joarder
Quoted 27 lines · Joe Perches
Quoted 5 lines · Souptick Joarder
Quoted 4 lines · Souptick Joarder
Quoted 3 lines · Krzysztof Hałasa
Quoted 1 line · Souptick Joarder
We should use
dma_pool_zallocinstead of dma_pool_alloc/memset[]
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c
Quoted 1 line
drivers/net/wan/ixp4xx_hss.c +0
-0[]
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
drivers/net/wan/ixp4xx_hss.c static int init_hdlc_queues(struct port *port) · line 983
Quoted 12 lines
drivers/net/wan/ixp4xx_hss.c +2
-3@@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) +if (!(port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys)))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));This look fine, feel free to send it to the netdev mailing list for inclusion.
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Including netdev mailing list based as requested.
Quoted 1 line
Acked-by Krzysztof Halasa <[email protected]>[]
Quoted 1 line
Any comment on this patch ?
Shouldn't the one in
drivers/net/ethernet/xscale/ixp4xx_eth.calso be changed?Yes, you are right. Do you want me to include it in same patch?
Quoted 7 lines
Quoted 1 line
Your choice. I would use a single patch.
There are few other places where the same change is applicable. I am planning to put all those changes in a single patch. It includes changes in
drivers/net/ethernet/xscale/ixp4xx_eth.cYou can review this patch separately.
If you are spanning multiple drivers maintained by different groups, it's probably better to create a patch series, one for each driver, to allow the various maintainers to apply the patches to their individually maintained drivers.
Joe