linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 9726/12841] drivers/platform/x86/amd-pmc.c:428:30: error: 'CONFIG_RTC_SYSTOHC_DEVICE' undeclared; did you mean 'CONFIG_RTC_HCTOSYS_DEVICE'?
@ 2021-10-30  9:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-30  9:28 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: kbuild-all, Linux Memory Management List, Hans de Goede

[-- Attachment #1: Type: text/plain, Size: 3221 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   bdcc9f6a568275aed4cc32fd2312432d2ff1b704
commit: 59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde [9726/12841] platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup
config: i386-randconfig-a003-20210930 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 59348401ebed9f0e8ffe2d5b9cf1de30ecb24dde
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/platform/x86/amd-pmc.c: In function 'amd_pmc_verify_czn_rtc':
>> drivers/platform/x86/amd-pmc.c:428:30: error: 'CONFIG_RTC_SYSTOHC_DEVICE' undeclared (first use in this function); did you mean 'CONFIG_RTC_HCTOSYS_DEVICE'?
     428 |  rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                              CONFIG_RTC_HCTOSYS_DEVICE
   drivers/platform/x86/amd-pmc.c:428:30: note: each undeclared identifier is reported only once for each function it appears in


vim +428 drivers/platform/x86/amd-pmc.c

   416	
   417	static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
   418	{
   419		struct rtc_device *rtc_device;
   420		time64_t then, now, duration;
   421		struct rtc_wkalrm alarm;
   422		struct rtc_time tm;
   423		int rc;
   424	
   425		if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
   426			return 0;
   427	
 > 428		rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
   429		if (!rtc_device)
   430			return 0;
   431		rc = rtc_read_alarm(rtc_device, &alarm);
   432		if (rc)
   433			return rc;
   434		if (!alarm.enabled) {
   435			dev_dbg(pdev->dev, "alarm not enabled\n");
   436			return 0;
   437		}
   438		rc = rtc_valid_tm(&alarm.time);
   439		if (rc)
   440			return rc;
   441		rc = rtc_read_time(rtc_device, &tm);
   442		if (rc)
   443			return rc;
   444		then = rtc_tm_to_time64(&alarm.time);
   445		now = rtc_tm_to_time64(&tm);
   446		duration = then-now;
   447	
   448		/* in the past */
   449		if (then < now)
   450			return 0;
   451	
   452		/* will be stored in upper 16 bits of s0i3 hint argument,
   453		 * so timer wakeup from s0i3 is limited to ~18 hours or less
   454		 */
   455		if (duration <= 4 || duration > U16_MAX)
   456			return -EINVAL;
   457	
   458		*arg |= (duration << 16);
   459		rc = rtc_alarm_irq_enable(rtc_device, 0);
   460		dev_info(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration);
   461	
   462		return rc;
   463	}
   464	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39021 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-30  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30  9:28 [linux-next:master 9726/12841] drivers/platform/x86/amd-pmc.c:428:30: error: 'CONFIG_RTC_SYSTOHC_DEVICE' undeclared; did you mean 'CONFIG_RTC_HCTOSYS_DEVICE'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).