From: Peng Fan <peng.fan@nxp.com>
To: "marc.zyngier@arm.com" <marc.zyngier@arm.com>,
"jason@lakedaemon.net" <jason@lakedaemon.net>,
"tglx@linutronix.de" <tglx@linutronix.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH] irqchip: gic-v3: remove dead code in gic_iterate_rdists
Date: Mon, 17 Dec 2018 07:51:41 +0000 [thread overview]
Message-ID: <20181217080040.6790-1-peng.fan@nxp.com> (raw)
In gic_iterate_rdists, ret will never be 0 when `ret ? -ENODEV : 0` at
the end of function, so let's directly return -ENODEV.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/irqchip/irq-gic-v3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 8f87f40c9460..9d6e802e29ce 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -425,7 +425,7 @@ static void __init gic_dist_init(void)
static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
{
- int ret = -ENODEV;
+ int ret;
int i;
for (i = 0; i < gic_data.nr_redist_regions; i++) {
@@ -459,7 +459,7 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
} while (!(typer & GICR_TYPER_LAST));
}
- return ret ? -ENODEV : 0;
+ return -ENODEV;
}
static int __gic_populate_rdist(struct redist_region *region, void __iomem *ptr)
--
2.14.1
reply other threads:[~2018-12-17 7:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20181217080040.6790-1-peng.fan@nxp.com \
--to=peng.fan@nxp.com \
--cc=jason@lakedaemon.net \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®