@@ -922,7 +922,7 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
{
struct device_node *node = of_node_get(np);
const __be32 *ranges = NULL;
- int len, naddr, nsize, pna;
+ int naddr, nsize, pna;
int ret = 0;
u64 dmaaddr;
@@ -931,6 +931,7 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
while (1) {
struct device_node *parent;
+ int len;
naddr = of_n_addr_cells(node);
nsize = of_n_size_cells(node);
@@ -962,8 +963,6 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
goto out;
}
- len /= sizeof(u32);
-
pna = of_n_addr_cells(node);
/* dma-ranges format:
'len' in of_dma_get_range() is used to check the 'dma-ranges' property length. After the fact, some calculations are run on the variable to be then left unused. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> --- drivers/of/address.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)