[PATCH v5 15/33] gpio: dw: Fix warnings about casting int to pointer

Sean Anderson seanga2 at gmail.com
Mon Mar 2 04:50:10 CET 2020


On 3/1/20 9:27 PM, Bin Meng wrote:
> Hi Sean,
> 
> On Sat, Feb 29, 2020 at 5:06 AM Sean Anderson <seanga2 at gmail.com> wrote:
>>
>> Explicitly cast fdt_addr_t to a void pointer, since we pass it to readl.
> 
> Explicitly cast => Change?
> 
> As what the patch does

The compiler was giving a warning since readl expects a pointer but
fdt_addr_t is typedef to some numeric type. This patch doesn't change
the variable we get from the fdt subsystem to a void pointer, but it
does change the base address we store to one.

--Sean


More information about the U-Boot mailing list