'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@xxxxxxx> --- drivers/of/address.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index 978427a9d5e6..0f898756199d 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -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: -- 2.23.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel