Re: linux-next: manual merge of the irqchip tree with Linus' tree

From: Geert Uytterhoeven
Date: Mon Apr 13 2015 - 05:19:00 EST


On Wed, Mar 18, 2015 at 6:52 PM, Jason Cooper <jason@xxxxxxxxxxxxxx> wrote:
> --- a/arch/arm/mach-exynos/suspend.c
> +++ b/arch/arm/mach-exynos/suspend.c
> @@ -615,17 +724,19 @@ static struct syscore_ops exynos_pm_syscore_ops;
> void __init exynos_pm_init(void)
> {
> const struct of_device_id *match;
> + struct device_node *np;
> u32 tmp;
>
> - of_find_matching_node_and_match(NULL, exynos_pmu_of_device_ids, &match);
> - if (!match) {
> + np = of_find_matching_node_and_match(NULL, exynos_pmu_of_device_ids, &match);
> + if (!np) {
> pr_err("Failed to find PMU node\n");
> return;
> }
> - pm_data = (struct exynos_pm_data *) match->data;
>
> - /* Platform-specific GIC callback */
> - gic_arch_extn.irq_set_wake = exynos_irq_set_wake;
> + if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL)))
> + pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
> +
> + pm_data = (struct exynos_pm_data *) match->data;

Upon first look, the cast above should be "const".
Upon second look, the cast is not needed at all (assigning "const void *"
to "const struct exynos_pm_data *").

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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/