core: of_addr: Correct the size type of of_get_address to fdt_size_t
PATCH 1/1 core: of_addr: Correct the size type of of_get_address to fdt_size_t
Currently the size parameter is deined as u64 type. Correct the size type of of_get_address to fdt_size_t so that both 64 bit and 32 bit architectures are taken care of.
--- drivers/core/of_addr.c | 4 ++-- drivers/core/ofnode.c | 2 +- include/dm/of_addr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/core/of_addr.c +2 -2
@@ -122,7 +122,7 @@ static void dev_count_cells(const struct device_node *np, int *nap, int *nsp) }const __be32 *of_get_address (const struct device_node *dev,int index, -u64 *size,unsigned int *flags) +fdt_size_t *size,unsigned int *flags) {const __be32 *prop;int psize;
@@ -347,7 +347,7 @@ int of_address_to_resource(const struct device_node *dev, int index, struct resource *r) {const __be32 *addrp; -u64 size; +fdt_size_t size;unsigned int flags;const char *name =NULL ;
drivers/core/ofnode.c +1 -1
@@ -260,7 +260,7 @@ fdt_addr_t ofnode_get_addr_size_index(ofnode node, int index, fdt_size_t *size)uint flags; prop_val =of_get_address (ofnode_to_np (node), index, - (u64 *)size, &flags); + size, &flags);if (!prop_val)return FDT_ADDR_T_NONE ;
include/dm/of_addr.h +1 -1
@@ -58,7 +58,7 @@ u64 of_translate_dma_address(const struct device_node *no, const __be32 *in_addr* @return pointer to address which can be read */ const __be32 *of_get_address (const struct device_node *no,int index, -u64 *size,unsigned int *flags); +fdt_size_t *size,unsigned int *flags);struct resource ;
Signature · 1 line
2.17.1
PATCH 1/1 core: of_addr: Correct the size type of of_get_address to fdt_size_t
Hi Keerthy,
Quoted 2 lines · Keerthy
Currently the size parameter is deined as u64 type.
s/deined/defined/
Quoted 3 lines
Correct the size type of
of_get_addresstofdt_size_tso that both 64 bit and 32 bit architectures are taken care of.
Please, reference the initial bug report
https://patchwork.ozlabs.org/patch/1090094/#2212555 and, ideally, add the "Fixes: <commit-adding-the-issue>" line.
Please, add: Reported-by: Eugeniu Rosca <[email protected]>
Quoted 6 lines
Signed-off-by Keerthy <[email protected]>--- drivers/core/of_addr.c | 4 ++-- drivers/core/ofnode.c | 2 +- include/dm/of_addr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Given my test results in https://patchwork.ozlabs.org/patch/1090094/#2238022:
Thank you very much.
Signature · 2 lines
Best Regards, Eugeniu.
PATCH 1/1 core: of_addr: Correct the size type of of_get_address to fdt_size_t
Superseded by https://patchwork.ozlabs.org/patch/1146933/
("core: of_addr: Correct the size type of of_get_address to fdt_size_t")