* [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
@ 2022-07-06 7:46 ` Claudiu Beznea
0 siblings, 0 replies; 8+ messages in thread
From: Claudiu Beznea @ 2022-07-06 7:46 UTC (permalink / raw)
To: tglx, maz, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-kernel, Claudiu Beznea
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@microchip.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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
@ 2022-07-06 7:46 ` Claudiu Beznea
0 siblings, 0 replies; 8+ messages in thread
From: Claudiu Beznea @ 2022-07-06 7:46 UTC (permalink / raw)
To: tglx, maz, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-kernel, Claudiu Beznea
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@microchip.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] irqchip/atmel-aic5: remove #ifdef CONFIG_PM
2022-07-06 7:46 ` Claudiu Beznea
@ 2022-07-06 7:46 ` Claudiu Beznea
-1 siblings, 0 replies; 8+ messages in thread
From: Claudiu Beznea @ 2022-07-06 7:46 UTC (permalink / raw)
To: tglx, maz, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-kernel, Claudiu Beznea
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] irqchip/atmel-aic5: remove #ifdef CONFIG_PM
@ 2022-07-06 7:46 ` Claudiu Beznea
0 siblings, 0 replies; 8+ messages in thread
From: Claudiu Beznea @ 2022-07-06 7:46 UTC (permalink / raw)
To: tglx, maz, nicolas.ferre, alexandre.belloni
Cc: linux-arm-kernel, linux-kernel, Claudiu Beznea
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
2022-07-06 7:46 ` Claudiu Beznea
@ 2022-07-11 8:49 ` Marc Zyngier
-1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2022-07-11 8:49 UTC (permalink / raw)
To: Claudiu Beznea
Cc: tglx, nicolas.ferre, alexandre.belloni, linux-arm-kernel, linux-kernel
Claudiu,
If you send more than a single patch, please add a cover letter.
On Wed, 06 Jul 2022 08:46:29 +0100,
Claudiu Beznea <claudiu.beznea@microchip.com> wrote:
>
> 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.
By your very own investigations, aic_suspend() and co are utterly
useless when !PM. And yet you want to *preserve* them, despite being
dead code? What purpose does it serve (other than some blind
compliance to a rule)?
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
@ 2022-07-11 8:49 ` Marc Zyngier
0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2022-07-11 8:49 UTC (permalink / raw)
To: Claudiu Beznea; +Cc: linux-arm-kernel, tglx, alexandre.belloni, linux-kernel
Claudiu,
If you send more than a single patch, please add a cover letter.
On Wed, 06 Jul 2022 08:46:29 +0100,
Claudiu Beznea <claudiu.beznea@microchip.com> wrote:
>
> 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.
By your very own investigations, aic_suspend() and co are utterly
useless when !PM. And yet you want to *preserve* them, despite being
dead code? What purpose does it serve (other than some blind
compliance to a rule)?
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
2022-07-11 8:49 ` Marc Zyngier
@ 2022-07-11 10:56 ` Claudiu.Beznea
-1 siblings, 0 replies; 8+ messages in thread
From: Claudiu.Beznea @ 2022-07-11 10:56 UTC (permalink / raw)
To: maz; +Cc: linux-arm-kernel, tglx, alexandre.belloni, linux-kernel
Hi, Marc,
On 11.07.2022 11:49, Marc Zyngier wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Claudiu,
>
> If you send more than a single patch, please add a cover letter.
OK, I'll kept it in mind.
>
> On Wed, 06 Jul 2022 08:46:29 +0100,
> Claudiu Beznea <claudiu.beznea@microchip.com> wrote:
>>
>> 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.
>
> By your very own investigations, aic_suspend() and co are utterly
> useless when !PM. And yet you want to *preserve* them, despite being
> dead code? What purpose does it serve (other than some blind
> compliance to a rule)?
Only compliance with the mentioned rule.
Thank you,
Claudiu Beznea
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM
@ 2022-07-11 10:56 ` Claudiu.Beznea
0 siblings, 0 replies; 8+ messages in thread
From: Claudiu.Beznea @ 2022-07-11 10:56 UTC (permalink / raw)
To: maz
Cc: tglx, Nicolas.Ferre, alexandre.belloni, linux-arm-kernel, linux-kernel
Hi, Marc,
On 11.07.2022 11:49, Marc Zyngier wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Claudiu,
>
> If you send more than a single patch, please add a cover letter.
OK, I'll kept it in mind.
>
> On Wed, 06 Jul 2022 08:46:29 +0100,
> Claudiu Beznea <claudiu.beznea@microchip.com> wrote:
>>
>> 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.
>
> By your very own investigations, aic_suspend() and co are utterly
> useless when !PM. And yet you want to *preserve* them, despite being
> dead code? What purpose does it serve (other than some blind
> compliance to a rule)?
Only compliance with the mentioned rule.
Thank you,
Claudiu Beznea
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-07-11 11:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 7:46 [PATCH 1/2] irqchip/atmel-aic: remove #ifdef CONFIG_PM Claudiu Beznea
2022-07-06 7:46 ` Claudiu Beznea
2022-07-06 7:46 ` [PATCH 2/2] irqchip/atmel-aic5: " Claudiu Beznea
2022-07-06 7:46 ` Claudiu Beznea
2022-07-11 8:49 ` [PATCH 1/2] irqchip/atmel-aic: " Marc Zyngier
2022-07-11 8:49 ` Marc Zyngier
2022-07-11 10:56 ` Claudiu.Beznea
2022-07-11 10:56 ` Claudiu.Beznea
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.