[bug report] powerpc/mm: dump block address translation on book3s/32
Dan Carpenter
dan.carpenter at oracle.com
Fri Feb 22 21:43:02 AEDT 2019
Hello Christophe Leroy,
The patch 7c91efce1608: "powerpc/mm: dump block address translation
on book3s/32" from Dec 3, 2018, leads to the following static checker
warning:
arch/powerpc/mm/dump_bats.c:20 pp_601()
warn: both sides of ternary the same: '"RWX"'
arch/powerpc/mm/dump_bats.c
13 static char *pp_601(int k, int pp)
14 {
15 if (pp == 0)
16 return k ? "NA" : "RWX";
17 if (pp == 1)
18 return k ? "ROX" : "RWX";
19 if (pp == 2)
--> 20 return k ? "RWX" : "RWX";
^^^ ^^^
21 return k ? "ROX" : "ROX";
^^^ ^^^
Was something else intended here? Or we could make it simpler:
if (pp == 2)
return "RWX";
return "ROX";
22 }
regards,
dan carpenter
More information about the Linuxppc-dev
mailing list