All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Prasanth Mantena <p-mantena@ti.com>
Cc: <u-boot@lists.denx.de>, <vigneshr@ti.com>, <trini@konsulko.com>,
	<u-kumar1@ti.com>
Subject: Re: [PATCH v1 1/2] dma: ti: k3-udma: fix dma_addr_t typecasts
Date: Thu, 28 Aug 2025 10:31:15 +0530	[thread overview]
Message-ID: <DCDSOXGFIACA.15WKCWCLLFAEL@ti.com> (raw)
In-Reply-To: <20250827161411.whvffhrbx4k7axnv@prasanth-server>

Hi Prasanth,

On Wed Aug 27, 2025 at 9:44 PM IST, Prasanth Mantena wrote:
> Hi Anshul,
> On 19:02, Anshul Dalal wrote:
>> With the change to dma_addr_t from u32 to u64 for the R5 SPL, the
>
> From above line, Does this patch meant to after patch 2/2 ?
>
>> existing typecasts from void* to int or vice-versa cause the compiler to
>> throw a "cast from pointer to integer of different size".
>> 
>> Therefore this patch changes the casts to a uintptr_t which is
>> guaranteed to hold any pointer value, thus supressing the compiler
>> warning.
>> 
>> Signed-off-by: Anshul Dalal <anshuld@ti.com>
>> ---
>>  drivers/dma/ti/k3-udma.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
>> index 723265ab2e5..01824310995 100644
>> --- a/drivers/dma/ti/k3-udma.c
>> +++ b/drivers/dma/ti/k3-udma.c
>> @@ -2327,7 +2327,7 @@ static int udma_send(struct dma *dma, void *src, size_t len, void *metadata)
>>  {
>>  	struct udma_dev *ud = dev_get_priv(dma->dev);
>>  	struct cppi5_host_desc_t *desc_tx;
>> -	dma_addr_t dma_src = (dma_addr_t)src;
>> +	dma_addr_t dma_src = (uintptr_t)src;
>
> Considering after the dma_addr_t changed to u64, please help me understand what
> warning does the above change fix.
>

This patch was meant to prevent warnings from the last patch of the
series, though I understand the confusion here. I will reword the commit
description to be more clear in v2.

Thanks,
Anshul

  reply	other threads:[~2025-08-28  5:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 13:32 [PATCH v1 0/2] Fix dma_addr_t for R5 SPL Anshul Dalal
2025-08-25 13:32 ` [PATCH v1 1/2] dma: ti: k3-udma: fix dma_addr_t typecasts Anshul Dalal
2025-08-27 16:14   ` Prasanth Mantena
2025-08-28  5:01     ` Anshul Dalal [this message]
2025-08-28  8:13       ` Anshul Dalal
2025-08-28  8:50   ` Kumar, Udit
2025-08-28 10:41     ` Anshul Dalal
2025-08-25 13:32 ` [PATCH v1 2/2] config: arch: k3: enable DMA_ADDR_T_64BIT Anshul Dalal

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=DCDSOXGFIACA.15WKCWCLLFAEL@ti.com \
    --to=anshuld@ti.com \
    --cc=p-mantena@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /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.