linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 05/10] rtc: cmos: Use `pm_suspend_preferred_s2idle`
       [not found] <20220701023328.2783-1-mario.limonciello@amd.com>
@ 2022-07-01  2:33 ` Mario Limonciello
  2022-07-01 11:50   ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-07-01  2:33 UTC (permalink / raw)
  To: mario.limonciello, Alessandro Zummo, Alexandre Belloni
  Cc: linux-pm, linux-rtc, linux-kernel

Drop the direct check from the FADT and use the helper instead.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/rtc/rtc-cmos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 7c006c2b125f..2e3d35e87061 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
+#include <linux/suspend.h>
 #include <linux/platform_device.h>
 #include <linux/log2.h>
 #include <linux/pm.h>
@@ -1260,7 +1261,7 @@ static void use_acpi_alarm_quirks(void)
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
 		return;
 
-	if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+	if (!pm_suspend_preferred_s2idle())
 		return;
 
 	if (!is_hpet_enabled())
-- 
2.34.1


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

* Re: [PATCH v3 05/10] rtc: cmos: Use `pm_suspend_preferred_s2idle`
  2022-07-01  2:33 ` [PATCH v3 05/10] rtc: cmos: Use `pm_suspend_preferred_s2idle` Mario Limonciello
@ 2022-07-01 11:50   ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-01 11:50 UTC (permalink / raw)
  To: Mario Limonciello, Alessandro Zummo, Alexandre Belloni
  Cc: kbuild-all, linux-pm, linux-rtc, linux-kernel

Hi Mario,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on drm-misc/drm-misc-next hid/for-next linus/master v5.19-rc4 next-20220701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/PM-suspend-Introduce-pm_suspend_preferred_s2idle/20220701-103534
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220701/202207011940.s0fsRy23-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/f5c9ad12802ecfaf2fc73e35ee9b563d7283b049
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Mario-Limonciello/PM-suspend-Introduce-pm_suspend_preferred_s2idle/20220701-103534
        git checkout f5c9ad12802ecfaf2fc73e35ee9b563d7283b049
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   drivers/rtc/rtc-cmos.c: In function 'use_acpi_alarm_quirks':
>> drivers/rtc/rtc-cmos.c:1264:14: error: implicit declaration of function 'pm_suspend_preferred_s2idle'; did you mean 'pm_suspend_default_s2idle'? [-Werror=implicit-function-declaration]
    1264 |         if (!pm_suspend_preferred_s2idle())
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |              pm_suspend_default_s2idle
   cc1: some warnings being treated as errors


vim +1264 drivers/rtc/rtc-cmos.c

  1256	
  1257	#ifdef CONFIG_X86
  1258	/* Enable use_acpi_alarm mode for Intel platforms no earlier than 2015 */
  1259	static void use_acpi_alarm_quirks(void)
  1260	{
  1261		if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
  1262			return;
  1263	
> 1264		if (!pm_suspend_preferred_s2idle())
  1265			return;
  1266	
  1267		if (!is_hpet_enabled())
  1268			return;
  1269	
  1270		if (dmi_get_bios_year() < 2015)
  1271			return;
  1272	
  1273		use_acpi_alarm = true;
  1274	}
  1275	#else
  1276	static inline void use_acpi_alarm_quirks(void) { }
  1277	#endif
  1278	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

end of thread, other threads:[~2022-07-01 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220701023328.2783-1-mario.limonciello@amd.com>
2022-07-01  2:33 ` [PATCH v3 05/10] rtc: cmos: Use `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-01 11:50   ` 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).