mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 18:20:25 +02:00
ARM: i.MX: system.c: Convert goto to if statement
Using goto here doesn't bring any advantages and only makes the code flow less clear. No functional changes. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
ead8126699
commit
c00e4c54d5
1 changed files with 17 additions and 19 deletions
|
|
@ -106,9 +106,7 @@ void __init imx_init_l2cache(void)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)
|
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
|
||||||
goto skip_if_enabled;
|
|
||||||
|
|
||||||
/* Configure the L2 PREFETCH and POWER registers */
|
/* Configure the L2 PREFETCH and POWER registers */
|
||||||
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
|
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
|
||||||
val |= 0x70800000;
|
val |= 0x70800000;
|
||||||
|
|
@ -124,8 +122,8 @@ void __init imx_init_l2cache(void)
|
||||||
if (cpu_is_imx6q())
|
if (cpu_is_imx6q())
|
||||||
val &= ~(1 << 30 | 1 << 23);
|
val &= ~(1 << 30 | 1 << 23);
|
||||||
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
|
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
|
||||||
|
}
|
||||||
|
|
||||||
skip_if_enabled:
|
|
||||||
iounmap(l2x0_base);
|
iounmap(l2x0_base);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue