All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] powerpc/mm: dump block address translation on book3s/32
@ 2019-02-22 10:43 Dan Carpenter
  2019-02-22 11:08 ` Christophe Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-02-22 10:43 UTC (permalink / raw)
  To: christophe.leroy; +Cc: linuxppc-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-22 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 10:43 [bug report] powerpc/mm: dump block address translation on book3s/32 Dan Carpenter
2019-02-22 11:08 ` Christophe Leroy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.