powerpc/setup: cleanup ifdef mess in check_cache_coherency()
Use IS_ENABLED() instead of #ifdefs Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
e9e9b25a4c
commit
b5064efee2
@@ -737,23 +737,19 @@ void __init setup_panic(void)
|
|||||||
* BUG() in that case.
|
* BUG() in that case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NOT_COHERENT_CACHE
|
#define KERNEL_COHERENCY (!IS_ENABLED(CONFIG_NOT_COHERENT_CACHE))
|
||||||
#define KERNEL_COHERENCY 0
|
|
||||||
#else
|
|
||||||
#define KERNEL_COHERENCY 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int __init check_cache_coherency(void)
|
static int __init check_cache_coherency(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
const void *prop;
|
const void *prop;
|
||||||
int devtree_coherency;
|
bool devtree_coherency;
|
||||||
|
|
||||||
np = of_find_node_by_path("/");
|
np = of_find_node_by_path("/");
|
||||||
prop = of_get_property(np, "coherency-off", NULL);
|
prop = of_get_property(np, "coherency-off", NULL);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
|
|
||||||
devtree_coherency = prop ? 0 : 1;
|
devtree_coherency = prop ? false : true;
|
||||||
|
|
||||||
if (devtree_coherency != KERNEL_COHERENCY) {
|
if (devtree_coherency != KERNEL_COHERENCY) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
|
|||||||
Reference in New Issue
Block a user