lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220706074630.829607-1-claudiu.beznea@microchip.com>
Date:   Wed, 6 Jul 2022 10:46:29 +0300
From:   Claudiu Beznea <claudiu.beznea@...rochip.com>
To:     <tglx@...utronix.de>, <maz@...nel.org>,
        <nicolas.ferre@...rochip.com>, <alexandre.belloni@...tlin.com>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM

Remove #ifdef CONFIG_PM around aic_suspend() 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@...rochip.com>
---
 drivers/irqchip/irq-atmel-aic.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index 4631f6847953..02a9f45a7d2e 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -102,7 +102,6 @@ static int aic_set_type(struct irq_data *d, unsigned type)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static void aic_suspend(struct irq_data *d)
 {
 	struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
@@ -132,11 +131,6 @@ static void aic_pm_shutdown(struct irq_data *d)
 	irq_reg_writel(gc, 0xffffffff, AT91_AIC_ICCR);
 	irq_gc_unlock(gc);
 }
-#else
-#define aic_suspend		NULL
-#define aic_resume		NULL
-#define aic_pm_shutdown		NULL
-#endif /* CONFIG_PM */
 
 static void __init aic_hw_init(struct irq_domain *domain)
 {
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ