[rafael-pm:bleeding-edge 42/43] include/linux/acpi.h:1133:49: warning: declaration of 'struct acpi_s2idle_dev_ops' will not be visible outside of this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   2c6f7196fd5d56b357e1f68d7be5866963aeea6f
commit: b748ba3ac26ac7c6f5ff7dc55d27583ce6ab4506 [42/43] ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
config: x86_64-buildonly-randconfig-002-20250221 (https://download.01.org/0day-ci/archive/20250221/202502211223.IKdRg7rk-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250221/202502211223.IKdRg7rk-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502211223.IKdRg7rk-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/platform/x86/intel/int1092/intel_sar.c:6:
>> include/linux/acpi.h:1133:49: warning: declaration of 'struct acpi_s2idle_dev_ops' will not be visible outside of this function [-Wvisibility]
    1133 | static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
         |                                                 ^
   include/linux/acpi.h:1137:52: warning: declaration of 'struct acpi_s2idle_dev_ops' will not be visible outside of this function [-Wvisibility]
    1137 | static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
         |                                                    ^
   2 warnings generated.


vim +1133 include/linux/acpi.h

  1105	
  1106	#ifdef CONFIG_ACPI
  1107	void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
  1108				       u32 pm1a_ctrl,  u32 pm1b_ctrl));
  1109	
  1110	acpi_status acpi_os_prepare_sleep(u8 sleep_state,
  1111					  u32 pm1a_control, u32 pm1b_control);
  1112	
  1113	void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state,
  1114					        u32 val_a,  u32 val_b));
  1115	
  1116	acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
  1117						   u32 val_a, u32 val_b);
  1118	#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
  1119	struct acpi_s2idle_dev_ops {
  1120		struct list_head list_node;
  1121		void (*prepare)(void);
  1122		void (*check)(void);
  1123		void (*restore)(void);
  1124	};
  1125	int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
  1126	void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
  1127	int acpi_get_lps0_constraint(struct acpi_device *adev);
  1128	#else /* CONFIG_SUSPEND && CONFIG_X86 */
  1129	static inline int acpi_get_lps0_constraint(struct device *dev)
  1130	{
  1131		return ACPI_STATE_UNKNOWN;
  1132	}
> 1133	static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
  1134	{
  1135		return -ENODEV;
  1136	}
  1137	static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
  1138	{
  1139	}
  1140	#endif /* CONFIG_SUSPEND && CONFIG_X86 */
  1141	void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
  1142	#else
  1143	#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
  1144	#endif
  1145	

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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux