From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Marc Zyngier <marc.zyngier@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] irqchip/gic-v3-its: drop redundant initialization in mk_lpi_range
Date: Tue, 12 Mar 2019 18:33:48 +0100 [thread overview]
Message-ID: <20190312173350.4025-4-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20190312173350.4025-1-linux@rasmusvillemoes.dk>
There's no reason to ask kmalloc() to zero the allocation, since all
the fields get initialized immediately afterwards. Except that there's
also not any reason to initialize the ->entry member, since the
element gets added to the lpi_range_list immediately.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
drivers/irqchip/irq-gic-v3-its.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 5c8232cff290..2ebc28a53d96 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1465,9 +1465,8 @@ static struct lpi_range *mk_lpi_range(u32 base, u32 span)
{
struct lpi_range *range;
- range = kzalloc(sizeof(*range), GFP_KERNEL);
+ range = kmalloc(sizeof(*range), GFP_KERNEL);
if (range) {
- INIT_LIST_HEAD(&range->entry);
range->base_id = base;
range->span = span;
}
--
2.20.1
next prev parent reply other threads:[~2019-03-12 17:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 17:33 [PATCH 0/4] irqchip/gic-v3-its: free_lpi_range tweaks Rasmus Villemoes
2019-03-12 17:33 ` [PATCH 1/4] irqchip/gic-v3-its: fix comparison logic in lpi_range_cmp Rasmus Villemoes
2019-03-12 17:33 ` [PATCH 2/4] irqchip/gic-v3-its: move allocation outside mutex Rasmus Villemoes
2019-03-12 17:33 ` Rasmus Villemoes [this message]
2019-03-12 17:33 ` [PATCH 4/4] irqchip/gic-v3-its: make free_lpi_range a little cheaper Rasmus Villemoes
2019-03-12 18:03 ` [PATCH 0/4] irqchip/gic-v3-its: free_lpi_range tweaks Marc Zyngier
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=20190312173350.4025-4-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=jason@lakedaemon.net \
--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®