public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: cmos: Remove redundant include of linux/acpi.h
@ 2026-03-04  2:35 Chen Ni
  2026-04-03 16:08 ` Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Ni @ 2026-03-04  2:35 UTC (permalink / raw)
  To: alexandre.belloni; +Cc: linux-rtc, Chen Ni

The header file <linux/acpi.h> is already included globally at the top
of the file. The second inclusion inside the #ifdef CONFIG_ACPI block is
redundant because the header uses include guards to prevent multiple
inclusions.

Remove the duplicate line to clean up the code and slightly reduce
preprocessing overhead.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/rtc/rtc-cmos.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 9ac5bab846c1..7c06b9d19273 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -743,8 +743,6 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
 
 #ifdef	CONFIG_ACPI
 
-#include <linux/acpi.h>
-
 static u32 rtc_handler(void *context)
 {
 	struct device *dev = context;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: cmos: Remove redundant include of linux/acpi.h
  2026-03-04  2:35 [PATCH] rtc: cmos: Remove redundant include of linux/acpi.h Chen Ni
@ 2026-04-03 16:08 ` Alexandre Belloni
  2026-04-04 10:19   ` Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2026-04-03 16:08 UTC (permalink / raw)
  To: Chen Ni; +Cc: linux-rtc

On Wed, 04 Mar 2026 10:35:33 +0800, Chen Ni wrote:
> The header file <linux/acpi.h> is already included globally at the top
> of the file. The second inclusion inside the #ifdef CONFIG_ACPI block is
> redundant because the header uses include guards to prevent multiple
> inclusions.
> 
> Remove the duplicate line to clean up the code and slightly reduce
> preprocessing overhead.
> 
> [...]

Applied, thanks!

[1/1] rtc: cmos: Remove redundant include of linux/acpi.h
      https://git.kernel.org/abelloni/c/a33bf4b6adf7

Best regards,

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtc: cmos: Remove redundant include of linux/acpi.h
  2026-04-03 16:08 ` Alexandre Belloni
@ 2026-04-04 10:19   ` Alexandre Belloni
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2026-04-04 10:19 UTC (permalink / raw)
  To: Chen Ni; +Cc: linux-rtc

On 03/04/2026 18:08:50+0200, Alexandre Belloni wrote:
> On Wed, 04 Mar 2026 10:35:33 +0800, Chen Ni wrote:
> > The header file <linux/acpi.h> is already included globally at the top
> > of the file. The second inclusion inside the #ifdef CONFIG_ACPI block is
> > redundant because the header uses include guards to prevent multiple
> > inclusions.
> > 
> > Remove the duplicate line to clean up the code and slightly reduce
> > preprocessing overhead.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] rtc: cmos: Remove redundant include of linux/acpi.h
>       https://git.kernel.org/abelloni/c/a33bf4b6adf7
> 

I'm dropping this as AI seemed to agree with you but acpi.h has actually
never been included twice in this file.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-04 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04  2:35 [PATCH] rtc: cmos: Remove redundant include of linux/acpi.h Chen Ni
2026-04-03 16:08 ` Alexandre Belloni
2026-04-04 10:19   ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox