Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-pm@vger.kernel.org
Subject: [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 &
Date: Sun, 27 Oct 2024 23:14:29 +0800	[thread overview]
Message-ID: <202410272314.4WjSxBUJ-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-10-27 15:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202410272314.4WjSxBUJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mario.limonciello@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox