* usb: gadget: udc: bdc: Use dma_pool_zalloc
@ 2018-02-14 18:29 Souptick Joarder
0 siblings, 0 replies; 2+ messages in thread
From: Souptick Joarder @ 2018-02-14 18:29 UTC (permalink / raw)
To: balbi; +Cc: linux-usb
Use dma_pool_zalloc instead of dma_pool_alloc + memset
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/usb/gadget/udc/bdc/bdc_ep.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
index f40d4c1..03149b9d 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
@@ -151,7 +151,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
if (!bd_table)
goto fail;
- bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool,
+ bd_table->start_bd = dma_pool_zalloc(bdc->bd_table_pool,
GFP_ATOMIC,
&dma);
if (!bd_table->start_bd) {
@@ -167,7 +167,6 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
(unsigned long long)bd_table->dma, prev_table);
ep->bd_list.bd_table_array[index] = bd_table;
- memset(bd_table->start_bd, 0, bd_p_tab * sizeof(struct bdc_bd));
if (prev_table)
chain_table(prev_table, bd_table, bd_p_tab);
^ permalink raw reply related [flat|nested] 2+ messages in thread* usb: gadget: udc: bdc: Use dma_pool_zalloc
@ 2018-03-06 18:05 Souptick Joarder
0 siblings, 0 replies; 2+ messages in thread
From: Souptick Joarder @ 2018-03-06 18:05 UTC (permalink / raw)
To: balbi; +Cc: linux-usb
Any comment for this patch.
On Wed, Feb 14, 2018 at 11:59 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> Use dma_pool_zalloc instead of dma_pool_alloc + memset
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/usb/gadget/udc/bdc/bdc_ep.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
> index f40d4c1..03149b9d 100644
> --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
> +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
> @@ -151,7 +151,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
> if (!bd_table)
> goto fail;
>
> - bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool,
> + bd_table->start_bd = dma_pool_zalloc(bdc->bd_table_pool,
> GFP_ATOMIC,
> &dma);
> if (!bd_table->start_bd) {
> @@ -167,7 +167,6 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
> (unsigned long long)bd_table->dma, prev_table);
>
> ep->bd_list.bd_table_array[index] = bd_table;
> - memset(bd_table->start_bd, 0, bd_p_tab * sizeof(struct bdc_bd));
> if (prev_table)
> chain_table(prev_table, bd_table, bd_p_tab);
>
> --
> 1.9.1
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-06 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 18:29 usb: gadget: udc: bdc: Use dma_pool_zalloc Souptick Joarder
-- strict thread matches above, loose matches on Subject: below --
2018-03-06 18:05 Souptick Joarder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox