All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [abelloni:rtc-next 17/17] drivers/rtc/rtc-cmos.c:776:2: error: call to undeclared function 'acpi_clear_event'; ISO C99 and later do not support implicit function declarations
Date: Tue, 07 Apr 2026 11:51:38 +0800	[thread overview]
Message-ID: <202604040743.432amNeb-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
head:   a33bf4b6adf70aa8c8a18a231ea7aed3fd1b3875
commit: a33bf4b6adf70aa8c8a18a231ea7aed3fd1b3875 [17/17] rtc: cmos: Remove redundant include of linux/acpi.h
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260404/202604040743.432amNeb-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260404/202604040743.432amNeb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604040743.432amNeb-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/rtc/rtc-cmos.c:776:2: error: call to undeclared function 'acpi_clear_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     776 |         acpi_clear_event(ACPI_EVENT_RTC);
         |         ^
>> drivers/rtc/rtc-cmos.c:776:19: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     776 |         acpi_clear_event(ACPI_EVENT_RTC);
         |                          ^
>> drivers/rtc/rtc-cmos.c:777:2: error: call to undeclared function 'acpi_disable_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     777 |         acpi_disable_event(ACPI_EVENT_RTC, 0);
         |         ^
   drivers/rtc/rtc-cmos.c:777:21: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     777 |         acpi_disable_event(ACPI_EVENT_RTC, 0);
         |                            ^
>> drivers/rtc/rtc-cmos.c:778:9: error: use of undeclared identifier 'ACPI_INTERRUPT_HANDLED'
     778 |         return ACPI_INTERRUPT_HANDLED;
         |                ^
>> drivers/rtc/rtc-cmos.c:783:6: error: use of undeclared identifier 'acpi_disabled'; did you mean '__cpu_disable'?
     783 |         if (acpi_disabled)
         |             ^~~~~~~~~~~~~
         |             __cpu_disable
   arch/x86/include/asm/smp.h:71:19: note: '__cpu_disable' declared here
      71 | static inline int __cpu_disable(void)
         |                   ^
>> drivers/rtc/rtc-cmos.c:786:2: error: call to undeclared function 'acpi_install_fixed_event_handler'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     786 |         acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
         |         ^
   drivers/rtc/rtc-cmos.c:786:35: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     786 |         acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
         |                                          ^
   drivers/rtc/rtc-cmos.c:791:2: error: call to undeclared function 'acpi_clear_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     791 |         acpi_clear_event(ACPI_EVENT_RTC);
         |         ^
   drivers/rtc/rtc-cmos.c:791:19: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     791 |         acpi_clear_event(ACPI_EVENT_RTC);
         |                          ^
   drivers/rtc/rtc-cmos.c:792:2: error: call to undeclared function 'acpi_disable_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     792 |         acpi_disable_event(ACPI_EVENT_RTC, 0);
         |         ^
   drivers/rtc/rtc-cmos.c:792:21: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     792 |         acpi_disable_event(ACPI_EVENT_RTC, 0);
         |                            ^
   drivers/rtc/rtc-cmos.c:797:6: error: use of undeclared identifier 'acpi_disabled'; did you mean '__cpu_disable'?
     797 |         if (acpi_disabled)
         |             ^~~~~~~~~~~~~
         |             __cpu_disable
   arch/x86/include/asm/smp.h:71:19: note: '__cpu_disable' declared here
      71 | static inline int __cpu_disable(void)
         |                   ^
>> drivers/rtc/rtc-cmos.c:800:2: error: call to undeclared function 'acpi_remove_fixed_event_handler'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     800 |         acpi_remove_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler);
         |         ^
   drivers/rtc/rtc-cmos.c:800:34: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     800 |         acpi_remove_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler);
         |                                         ^
   drivers/rtc/rtc-cmos.c:805:2: error: call to undeclared function 'acpi_clear_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     805 |         acpi_clear_event(ACPI_EVENT_RTC);
         |         ^
   drivers/rtc/rtc-cmos.c:805:19: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     805 |         acpi_clear_event(ACPI_EVENT_RTC);
         |                          ^
>> drivers/rtc/rtc-cmos.c:806:2: error: call to undeclared function 'acpi_enable_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     806 |         acpi_enable_event(ACPI_EVENT_RTC, 0);
         |         ^
   drivers/rtc/rtc-cmos.c:806:20: error: use of undeclared identifier 'ACPI_EVENT_RTC'
     806 |         acpi_enable_event(ACPI_EVENT_RTC, 0);
         |                           ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.


vim +/acpi_clear_event +776 drivers/rtc/rtc-cmos.c

dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  744  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  745  static u32 rtc_handler(void *context)
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  746  {
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  747  	struct device *dev = context;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  748  	struct cmos_rtc *cmos = dev_get_drvdata(dev);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  749  	unsigned char rtc_control = 0;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  750  	unsigned char rtc_intr;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  751  	unsigned long flags;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  752  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  753  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  754  	/*
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  755  	 * Always update rtc irq when ACPI is used as RTC Alarm.
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  756  	 * Or else, ACPI SCI is enabled during suspend/resume only,
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  757  	 * update rtc irq in that case.
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  758  	 */
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  759  	if (cmos_use_acpi_alarm())
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  760  		cmos_interrupt(0, (void *)cmos->rtc);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  761  	else {
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  762  		/* Fix me: can we use cmos_interrupt() here as well? */
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  763  		spin_lock_irqsave(&rtc_lock, flags);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  764  		if (cmos_rtc.suspend_ctrl)
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  765  			rtc_control = CMOS_READ(RTC_CONTROL);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  766  		if (rtc_control & RTC_AIE) {
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  767  			cmos_rtc.suspend_ctrl &= ~RTC_AIE;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  768  			CMOS_WRITE(rtc_control, RTC_CONTROL);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  769  			rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  770  			rtc_update_irq(cmos->rtc, 1, rtc_intr);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  771  		}
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  772  		spin_unlock_irqrestore(&rtc_lock, flags);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  773  	}
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  774  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  775  	pm_wakeup_hard_event(dev);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @776  	acpi_clear_event(ACPI_EVENT_RTC);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @777  	acpi_disable_event(ACPI_EVENT_RTC, 0);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @778  	return ACPI_INTERRUPT_HANDLED;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  779  }
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  780  
d13e9ad9f5146f Rafael J. Wysocki 2022-11-09  781  static void acpi_rtc_event_setup(struct device *dev)
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  782  {
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @783  	if (acpi_disabled)
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  784  		return;
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  785  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @786  	acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  787  	/*
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  788  	 * After the RTC handler is installed, the Fixed_RTC event should
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  789  	 * be disabled. Only when the RTC alarm is set will it be enabled.
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  790  	 */
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  791  	acpi_clear_event(ACPI_EVENT_RTC);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  792  	acpi_disable_event(ACPI_EVENT_RTC, 0);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  793  }
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  794  
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  795  static void acpi_rtc_event_cleanup(void)
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  796  {
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  797  	if (acpi_disabled)
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  798  		return;
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  799  
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09 @800  	acpi_remove_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler);
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  801  }
83ebb7b3036d15 Rafael J. Wysocki 2022-11-09  802  
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  803  static void rtc_wake_on(struct device *dev)
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  804  {
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  805  	acpi_clear_event(ACPI_EVENT_RTC);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09 @806  	acpi_enable_event(ACPI_EVENT_RTC, 0);
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  807  }
dca4d3b71c8a09 Rafael J. Wysocki 2022-11-09  808  

:::::: The code at line 776 was first introduced by commit
:::::: dca4d3b71c8a09a16951add656711fbd6f5bfbb0 rtc: cmos: Eliminate forward declarations of some functions

:::::: TO: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
:::::: CC: Alexandre Belloni <alexandre.belloni@bootlin.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-04-07  3:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  3:51 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-03 20:23 [abelloni:rtc-next 17/17] drivers/rtc/rtc-cmos.c:776:2: error: call to undeclared function 'acpi_clear_event'; ISO C99 and later do not support implicit function declarations kernel test robot

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=202604040743.432amNeb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.