Hi Laurent, On Thu, Jul 16, 2015 at 10:41 AM, Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote: >> drivers/pinctrl/sh-pfc/core.c | 46 ++++++++++++++++++---------------------- >> 1 file changed, 21 insertions(+), 25 deletions(-) >> >> diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c >> index 865d235612c5200a..9796238959047508 100644 >> --- a/drivers/pinctrl/sh-pfc/core.c >> +++ b/drivers/pinctrl/sh-pfc/core.c >> @@ -29,24 +29,25 @@ >> static int sh_pfc_map_resources(struct sh_pfc *pfc, >> struct platform_device *pdev) >> { >> - unsigned int num_windows = 0; >> - unsigned int num_irqs = 0; >> + unsigned int num_windows, num_irqs; >> struct sh_pfc_window *windows; >> unsigned int *irqs = NULL; >> struct resource *res; >> unsigned int i; >> + int irq; >> >> /* Count the MEM and IRQ resources. */ >> - for (i = 0; i < pdev->num_resources; ++i) { >> - switch (resource_type(&pdev->resource[i])) { >> - case IORESOURCE_MEM: >> - num_windows++; >> + for (num_windows = 0;; num_windows++) { > > Just a bit of nit-picking, I'd add a space between the two ; (same for the > next loop). I had done my research ;-) $ git grep 'for.*;;' | wc -l 1410 $ git grep 'for.*; ;' | wc -l 190 $ >> + res = platform_get_resource(pdev, IORESOURCE_MEM, num_windows); >> + if (!res) >> break; >> - >> - case IORESOURCE_IRQ: >> - num_irqs++; >> + } > > And a blank line here. I didn't add one, to make clear the block falls under the "Count the MEM and IRQ resources. " comment, too. Let's leave this to Linus to decide... > The rest looks fine to me. > > Acked-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html