LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: christophe.leroy@c-s.fr
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [bug report] powerpc/mm: dump block address translation on book3s/32
Date: Fri, 22 Feb 2019 13:43:02 +0300	[thread overview]
Message-ID: <20190222104302.GA17252@kadam> (raw)

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

             reply	other threads:[~2019-02-22 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 10:43 Dan Carpenter [this message]
2019-02-22 11:08 ` [bug report] powerpc/mm: dump block address translation on book3s/32 Christophe Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190222104302.GA17252@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox