All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] drivers: dma: ti: k3-udma: Extract packet data only when Meta data is not NULL
Date: Wed, 24 Apr 2019 14:10:11 +0300	[thread overview]
Message-ID: <14790ca6-8471-3acb-49ca-c1942c7c7ddf@ti.com> (raw)
In-Reply-To: <20190424110354.5501-1-j-keerthy@ti.com>



On 24/04/2019 14.03, Keerthy wrote:
> Currently packet data is wrongly extracted when metadata is NULL.
> Fix it and negate the if check.

Good catch.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
>  drivers/dma/ti/k3-udma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index f78a01aa8f..e9ca09d8d3 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -1492,7 +1492,7 @@ static int udma_send(struct dma *dma, void *src, size_t len, void *metadata)
>  	u32 tc_ring_id;
>  	int ret;
>  
> -	if (!metadata)
> +	if (metadata)
>  		packet_data = *((struct ti_udma_drv_packet_data *)metadata);
>  
>  	if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) {
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply	other threads:[~2019-04-24 11:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 11:03 [U-Boot] [PATCH] drivers: dma: ti: k3-udma: Extract packet data only when Meta data is not NULL Keerthy
2019-04-24 11:10 ` Peter Ujfalusi [this message]
2019-05-03 18:19 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14790ca6-8471-3acb-49ca-c1942c7c7ddf@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.