Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [amd-pstate:superm1/multiple-platform-profile-handlers-v2 13/15] drivers/acpi/platform_profile.c:209:29: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const unsigned long *'; take the address with &
@ 2024-10-27 15:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-27 15:14 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: llvm, oe-kbuild-all, linux-pm

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git superm1/multiple-platform-profile-handlers-v2
head:   cca7df72a75a655ad552ae621054784b4a41c9ac
commit: e336433fe10fc421aeece46f2d67647e0c91931b [13/15] ACPI: platform_profile: Check all profile handler to calculate next
config: x86_64-buildonly-randconfig-001-20241027 (https://download.01.org/0day-ci/archive/20241027/202410272314.4WjSxBUJ-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410272314.4WjSxBUJ-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/202410272314.4WjSxBUJ-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/acpi/platform_profile.c:59:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
      59 |         int err;
         |             ^
   drivers/acpi/platform_profile.c:115:35: warning: unused variable 'handler' [-Wunused-variable]
     115 |         struct platform_profile_handler *handler;
         |                                          ^~~~~~~
>> drivers/acpi/platform_profile.c:209:29: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const unsigned long *'; take the address with & [-Wint-conversion]
     209 |                 next = find_next_bit_wrap(choices,
         |                                           ^~~~~~~
         |                                           &
   include/linux/find.h:452:55: note: passing argument to parameter 'addr' here
     452 | unsigned long find_next_bit_wrap(const unsigned long *addr,
         |                                                       ^
   2 warnings and 1 error generated.


vim +209 drivers/acpi/platform_profile.c

   192	
   193	
   194	int platform_profile_cycle(void)
   195	{
   196		enum platform_profile_option next = PLATFORM_PROFILE_LAST;
   197		struct platform_profile_handler *handler;
   198		enum platform_profile_option profile;
   199		unsigned long choices;
   200		int err;
   201	
   202		scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &profile_lock) {
   203			err = platform_profile_get_active(&profile);
   204			if (err)
   205				return err;
   206	
   207			choices = platform_profile_get_choices();
   208	
 > 209			next = find_next_bit_wrap(choices,
   210						  PLATFORM_PROFILE_LAST,
   211						  profile + 1);
   212	
   213			list_for_each_entry(handler, &platform_profile_handler_list, list) {
   214				err = handler->profile_set(handler, next);
   215				if (err) {
   216					pr_err("Failed to set profile for handler %s\n", handler->name);
   217					break;
   218				}
   219			}
   220			if (err) {
   221				list_for_each_entry_continue_reverse(handler, &platform_profile_handler_list, list) {
   222					err = handler->profile_set(handler, PLATFORM_PROFILE_BALANCED);
   223					if (err)
   224						pr_err("Failed to revert profile for handler %s\n", handler->name);
   225				}
   226			}
   227		}
   228	
   229		sysfs_notify(acpi_kobj, NULL, "platform_profile");
   230	
   231		return 0;
   232	}
   233	EXPORT_SYMBOL_GPL(platform_profile_cycle);
   234	

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

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

only message in thread, other threads:[~2024-10-27 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27 15:14 [amd-pstate:superm1/multiple-platform-profile-handlers-v2 13/15] drivers/acpi/platform_profile.c:209:29: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const unsigned long *'; take the address with & 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