From: Claudiu Beznea <claudiu.beznea@microchip.com>
To: <tglx@linutronix.de>, <maz@kernel.org>,
<nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: [PATCH 2/2] irqchip/atmel-aic5: remove #ifdef CONFIG_PM
Date: Wed, 6 Jul 2022 10:46:30 +0300 [thread overview]
Message-ID: <20220706074630.829607-2-claudiu.beznea@microchip.com> (raw)
In-Reply-To: <20220706074630.829607-1-claudiu.beznea@microchip.com>
Remove #ifdef CONFIG_PM around aic5_suspend() function and from
aic5_hw_init() function. Coding style recommends (at chapter Conditional
Compilation) to avoid using preprocessor conditional in .c files.
gc->chip_types->chip.irq_suspend()/gc->chip_types->chip.irq_resume() is
called in irq_gc_suspend()/irq_gc_resume() which is NULL in case CONFIG_PM
is not defined. With this gc->chip_types->chip.irq_pm_shutdown is
populated all the time as it should be as irq_gc_shutdown() is not
conditioned by CONFIG_PM.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
drivers/irqchip/irq-atmel-aic5.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic5.c
index 145535bd7560..890df0cf57d6 100644
--- a/drivers/irqchip/irq-atmel-aic5.c
+++ b/drivers/irqchip/irq-atmel-aic5.c
@@ -149,7 +149,6 @@ static int aic5_set_type(struct irq_data *d, unsigned type)
return ret;
}
-#ifdef CONFIG_PM
static u32 *smr_cache;
static void aic5_suspend(struct irq_data *d)
@@ -234,11 +233,6 @@ static void aic5_pm_shutdown(struct irq_data *d)
}
irq_gc_unlock(bgc);
}
-#else
-#define aic5_suspend NULL
-#define aic5_resume NULL
-#define aic5_pm_shutdown NULL
-#endif /* CONFIG_PM */
static void __init aic5_hw_init(struct irq_domain *domain)
{
@@ -369,12 +363,10 @@ static int __init aic5_of_init(struct device_node *node,
static int __init sama5d2_aic5_of_init(struct device_node *node,
struct device_node *parent)
{
-#ifdef CONFIG_PM
smr_cache = kcalloc(DIV_ROUND_UP(NR_SAMA5D2_IRQS, 32) * 32,
sizeof(*smr_cache), GFP_KERNEL);
if (!smr_cache)
return -ENOMEM;
-#endif
return aic5_of_init(node, parent, NR_SAMA5D2_IRQS);
}
--
2.34.1
next prev parent reply other threads:[~2022-07-06 7:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 7:46 [PATCH 1/2] irqchip/atmel-aic: " Claudiu Beznea
2022-07-06 7:46 ` Claudiu Beznea [this message]
2022-07-11 8:49 ` Marc Zyngier
2022-07-11 10:56 ` Claudiu.Beznea
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=20220706074630.829607-2-claudiu.beznea@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=nicolas.ferre@microchip.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®