public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mmc: bcm283x: fix int to pointer cast
       [not found] <CGME20200515101400epcas1p25d3d3ba611bde5628cba9cade6682c8f@epcas1p2.samsung.com>
@ 2020-05-15 10:14 ` Seung-Woo Kim
  2020-05-15 11:07   ` Jaehoon Chung
  0 siblings, 1 reply; 4+ messages in thread
From: Seung-Woo Kim @ 2020-05-15 10:14 UTC (permalink / raw)
  To: u-boot

On build with 32 bit, there is a warning for int-to-pointer-cast.
Fix the int to pointer cast by using uintptr_t.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
 drivers/mmc/bcm2835_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 39c93db275..c31f099f25 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -209,7 +209,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
 	priv->last_write = 0;
 
 	host->name = dev->name;
-	host->ioaddr = (void *)base;
+	host->ioaddr = (void *)(uintptr_t)base;
 	host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
 		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
 	host->max_clk = emmc_freq;
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] mmc: bcm283x: fix int to pointer cast
  2020-05-15 10:14 ` [PATCH] mmc: bcm283x: fix int to pointer cast Seung-Woo Kim
@ 2020-05-15 11:07   ` Jaehoon Chung
  2020-05-16  2:57     ` Seung-Woo Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Jaehoon Chung @ 2020-05-15 11:07 UTC (permalink / raw)
  To: u-boot

On 5/15/20 7:14 PM, Seung-Woo Kim wrote:
> On build with 32 bit, there is a warning for int-to-pointer-cast.
> Fix the int to pointer cast by using uintptr_t.

Could you share in more detail? I didn't see any warning with gcc 9.2 / 8.3 / 7.4 /6.5.


Best Regards,
Jaehoon Chung


> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> ---
>  drivers/mmc/bcm2835_sdhci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
> index 39c93db275..c31f099f25 100644
> --- a/drivers/mmc/bcm2835_sdhci.c
> +++ b/drivers/mmc/bcm2835_sdhci.c
> @@ -209,7 +209,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
>  	priv->last_write = 0;
>  
>  	host->name = dev->name;
> -	host->ioaddr = (void *)base;
> +	host->ioaddr = (void *)(uintptr_t)base;
>  	host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
>  		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
>  	host->max_clk = emmc_freq;
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mmc: bcm283x: fix int to pointer cast
  2020-05-15 11:07   ` Jaehoon Chung
@ 2020-05-16  2:57     ` Seung-Woo Kim
  2020-05-18  7:24       ` Matthias Brugger
  0 siblings, 1 reply; 4+ messages in thread
From: Seung-Woo Kim @ 2020-05-16  2:57 UTC (permalink / raw)
  To: u-boot

Hi Jaehoon,

On 2020? 05? 15? 20:07, Jaehoon Chung wrote:
> On 5/15/20 7:14 PM, Seung-Woo Kim wrote:
>> On build with 32 bit, there is a warning for int-to-pointer-cast.
>> Fix the int to pointer cast by using uintptr_t.
> 
> Could you share in more detail? I didn't see any warning with gcc 9.2 / 8.3 / 7.4 /6.5.

Sorry for not giving detail. If I applied PICe XHCI support [1], and
build rpi_4_32b, then I got related warning.

If [1] is not applied, then this can be ignored.

[1]
https://patchwork.ozlabs.org/project/uboot/patch/20200504124523.23484-7-s.nawrocki at samsung.com/

Best Regards,
- Seung-Woo Kim

> 
> 
> Best Regards,
> Jaehoon Chung
> 
> 
>>
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
>> ---
>>  drivers/mmc/bcm2835_sdhci.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
>> index 39c93db275..c31f099f25 100644
>> --- a/drivers/mmc/bcm2835_sdhci.c
>> +++ b/drivers/mmc/bcm2835_sdhci.c
>> @@ -209,7 +209,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
>>  	priv->last_write = 0;
>>  
>>  	host->name = dev->name;
>> -	host->ioaddr = (void *)base;
>> +	host->ioaddr = (void *)(uintptr_t)base;
>>  	host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
>>  		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
>>  	host->max_clk = emmc_freq;
>>
> 
> 
> 

-- 
Seung-Woo Kim
Samsung Research
--

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mmc: bcm283x: fix int to pointer cast
  2020-05-16  2:57     ` Seung-Woo Kim
@ 2020-05-18  7:24       ` Matthias Brugger
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2020-05-18  7:24 UTC (permalink / raw)
  To: u-boot



On 16/05/2020 04:57, Seung-Woo Kim wrote:
> Hi Jaehoon,
> 
> On 2020? 05? 15? 20:07, Jaehoon Chung wrote:
>> On 5/15/20 7:14 PM, Seung-Woo Kim wrote:
>>> On build with 32 bit, there is a warning for int-to-pointer-cast.
>>> Fix the int to pointer cast by using uintptr_t.
>>
>> Could you share in more detail? I didn't see any warning with gcc 9.2 / 8.3 / 7.4 /6.5.
> 
> Sorry for not giving detail. If I applied PICe XHCI support [1], and
> build rpi_4_32b, then I got related warning.
> 
> If [1] is not applied, then this can be ignored.

This is actually discussed in a new series [1]. If you have the same finding
there then we should include your patch to the series.

Please check and follow up there if necessary.

Regards,
Matthias

[1] https://www.mail-archive.com/u-boot at lists.denx.de/msg369283.html

> 
> [1]
> https://patchwork.ozlabs.org/project/uboot/patch/20200504124523.23484-7-s.nawrocki at samsung.com/
> 
> Best Regards,
> - Seung-Woo Kim
> 
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>
>>>
>>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
>>> ---
>>>  drivers/mmc/bcm2835_sdhci.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
>>> index 39c93db275..c31f099f25 100644
>>> --- a/drivers/mmc/bcm2835_sdhci.c
>>> +++ b/drivers/mmc/bcm2835_sdhci.c
>>> @@ -209,7 +209,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
>>>  	priv->last_write = 0;
>>>  
>>>  	host->name = dev->name;
>>> -	host->ioaddr = (void *)base;
>>> +	host->ioaddr = (void *)(uintptr_t)base;
>>>  	host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |
>>>  		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT;
>>>  	host->max_clk = emmc_freq;
>>>
>>
>>
>>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-18  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20200515101400epcas1p25d3d3ba611bde5628cba9cade6682c8f@epcas1p2.samsung.com>
2020-05-15 10:14 ` [PATCH] mmc: bcm283x: fix int to pointer cast Seung-Woo Kim
2020-05-15 11:07   ` Jaehoon Chung
2020-05-16  2:57     ` Seung-Woo Kim
2020-05-18  7:24       ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox