public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	markpearson@lenovo.com, pobrn@protonmail.com,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH v2] ACPI: platform_profile: Add support for notification chains
Date: Fri, 29 Oct 2021 08:58:06 +0800	[thread overview]
Message-ID: <202110290851.d6ReiRwO-lkp@intel.com> (raw)
In-Reply-To: <20211025210303.29083-1-mario.limonciello@amd.com>

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

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 linus/master v5.15-rc7 next-20211028]
[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/0day-ci/linux/commits/Mario-Limonciello/ACPI-platform_profile-Add-support-for-notification-chains/20211026-050443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-a013-20211028 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/753ef2d5047b65eb707df546173703ca66305f95
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mario-Limonciello/ACPI-platform_profile-Add-support-for-notification-chains/20211026-050443
        git checkout 753ef2d5047b65eb707df546173703ca66305f95
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 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/asus-wmi.c:2172:12: error: static declaration of 'platform_profile_get' follows non-static declaration
   static int platform_profile_get(struct platform_profile_handler *pprof,
              ^
   include/linux/platform_profile.h:42:5: note: previous declaration is here
   int platform_profile_get(enum platform_profile_option *profile);
       ^
>> drivers/platform/x86/asus-wmi.c:2239:45: error: incompatible function pointer types assigning to 'int (*)(struct platform_profile_handler *, enum platform_profile_option *)' from 'int (enum platform_profile_option *)' [-Werror,-Wincompatible-function-pointer-types]
           asus->platform_profile_handler.profile_get = platform_profile_get;
                                                      ^ ~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/platform_profile_get +2172 drivers/platform/x86/asus-wmi.c

2daa86e78c494d Leonid Maksymchuk 2019-12-15  2170  
c63d44ae602419 Luke D. Jones     2021-08-19  2171  /* Platform profile ***********************************************************/
c63d44ae602419 Luke D. Jones     2021-08-19 @2172  static int platform_profile_get(struct platform_profile_handler *pprof,
c63d44ae602419 Luke D. Jones     2021-08-19  2173  				enum platform_profile_option *profile)
c63d44ae602419 Luke D. Jones     2021-08-19  2174  {
c63d44ae602419 Luke D. Jones     2021-08-19  2175  	struct asus_wmi *asus;
c63d44ae602419 Luke D. Jones     2021-08-19  2176  	int tp;
c63d44ae602419 Luke D. Jones     2021-08-19  2177  
c63d44ae602419 Luke D. Jones     2021-08-19  2178  	asus = container_of(pprof, struct asus_wmi, platform_profile_handler);
c63d44ae602419 Luke D. Jones     2021-08-19  2179  
c63d44ae602419 Luke D. Jones     2021-08-19  2180  	tp = asus->throttle_thermal_policy_mode;
c63d44ae602419 Luke D. Jones     2021-08-19  2181  
c63d44ae602419 Luke D. Jones     2021-08-19  2182  	switch (tp) {
c63d44ae602419 Luke D. Jones     2021-08-19  2183  	case ASUS_THROTTLE_THERMAL_POLICY_DEFAULT:
c63d44ae602419 Luke D. Jones     2021-08-19  2184  		*profile = PLATFORM_PROFILE_BALANCED;
c63d44ae602419 Luke D. Jones     2021-08-19  2185  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2186  	case ASUS_THROTTLE_THERMAL_POLICY_OVERBOOST:
c63d44ae602419 Luke D. Jones     2021-08-19  2187  		*profile = PLATFORM_PROFILE_PERFORMANCE;
c63d44ae602419 Luke D. Jones     2021-08-19  2188  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2189  	case ASUS_THROTTLE_THERMAL_POLICY_SILENT:
c63d44ae602419 Luke D. Jones     2021-08-19  2190  		*profile = PLATFORM_PROFILE_QUIET;
c63d44ae602419 Luke D. Jones     2021-08-19  2191  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2192  	default:
c63d44ae602419 Luke D. Jones     2021-08-19  2193  		return -EINVAL;
c63d44ae602419 Luke D. Jones     2021-08-19  2194  	}
c63d44ae602419 Luke D. Jones     2021-08-19  2195  
c63d44ae602419 Luke D. Jones     2021-08-19  2196  	return 0;
c63d44ae602419 Luke D. Jones     2021-08-19  2197  }
c63d44ae602419 Luke D. Jones     2021-08-19  2198  
c63d44ae602419 Luke D. Jones     2021-08-19  2199  static int platform_profile_set(struct platform_profile_handler *pprof,
c63d44ae602419 Luke D. Jones     2021-08-19  2200  				enum platform_profile_option profile)
c63d44ae602419 Luke D. Jones     2021-08-19  2201  {
c63d44ae602419 Luke D. Jones     2021-08-19  2202  	struct asus_wmi *asus;
c63d44ae602419 Luke D. Jones     2021-08-19  2203  	int tp;
c63d44ae602419 Luke D. Jones     2021-08-19  2204  
c63d44ae602419 Luke D. Jones     2021-08-19  2205  	asus = container_of(pprof, struct asus_wmi, platform_profile_handler);
c63d44ae602419 Luke D. Jones     2021-08-19  2206  
c63d44ae602419 Luke D. Jones     2021-08-19  2207  	switch (profile) {
c63d44ae602419 Luke D. Jones     2021-08-19  2208  	case PLATFORM_PROFILE_PERFORMANCE:
c63d44ae602419 Luke D. Jones     2021-08-19  2209  		tp = ASUS_THROTTLE_THERMAL_POLICY_OVERBOOST;
c63d44ae602419 Luke D. Jones     2021-08-19  2210  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2211  	case PLATFORM_PROFILE_BALANCED:
c63d44ae602419 Luke D. Jones     2021-08-19  2212  		tp = ASUS_THROTTLE_THERMAL_POLICY_DEFAULT;
c63d44ae602419 Luke D. Jones     2021-08-19  2213  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2214  	case PLATFORM_PROFILE_QUIET:
c63d44ae602419 Luke D. Jones     2021-08-19  2215  		tp = ASUS_THROTTLE_THERMAL_POLICY_SILENT;
c63d44ae602419 Luke D. Jones     2021-08-19  2216  		break;
c63d44ae602419 Luke D. Jones     2021-08-19  2217  	default:
c63d44ae602419 Luke D. Jones     2021-08-19  2218  		return -EOPNOTSUPP;
c63d44ae602419 Luke D. Jones     2021-08-19  2219  	}
c63d44ae602419 Luke D. Jones     2021-08-19  2220  
c63d44ae602419 Luke D. Jones     2021-08-19  2221  	asus->throttle_thermal_policy_mode = tp;
c63d44ae602419 Luke D. Jones     2021-08-19  2222  	return throttle_thermal_policy_write(asus);
c63d44ae602419 Luke D. Jones     2021-08-19  2223  }
c63d44ae602419 Luke D. Jones     2021-08-19  2224  
c63d44ae602419 Luke D. Jones     2021-08-19  2225  static int platform_profile_setup(struct asus_wmi *asus)
c63d44ae602419 Luke D. Jones     2021-08-19  2226  {
c63d44ae602419 Luke D. Jones     2021-08-19  2227  	struct device *dev = &asus->platform_device->dev;
c63d44ae602419 Luke D. Jones     2021-08-19  2228  	int err;
c63d44ae602419 Luke D. Jones     2021-08-19  2229  
c63d44ae602419 Luke D. Jones     2021-08-19  2230  	/*
c63d44ae602419 Luke D. Jones     2021-08-19  2231  	 * Not an error if a component platform_profile relies on is unavailable
c63d44ae602419 Luke D. Jones     2021-08-19  2232  	 * so early return, skipping the setup of platform_profile.
c63d44ae602419 Luke D. Jones     2021-08-19  2233  	 */
c63d44ae602419 Luke D. Jones     2021-08-19  2234  	if (!asus->throttle_thermal_policy_available)
c63d44ae602419 Luke D. Jones     2021-08-19  2235  		return 0;
c63d44ae602419 Luke D. Jones     2021-08-19  2236  
c63d44ae602419 Luke D. Jones     2021-08-19  2237  	dev_info(dev, "Using throttle_thermal_policy for platform_profile support\n");
c63d44ae602419 Luke D. Jones     2021-08-19  2238  
c63d44ae602419 Luke D. Jones     2021-08-19 @2239  	asus->platform_profile_handler.profile_get = platform_profile_get;
c63d44ae602419 Luke D. Jones     2021-08-19  2240  	asus->platform_profile_handler.profile_set = platform_profile_set;
c63d44ae602419 Luke D. Jones     2021-08-19  2241  
c63d44ae602419 Luke D. Jones     2021-08-19  2242  	set_bit(PLATFORM_PROFILE_QUIET, asus->platform_profile_handler.choices);
c63d44ae602419 Luke D. Jones     2021-08-19  2243  	set_bit(PLATFORM_PROFILE_BALANCED,
c63d44ae602419 Luke D. Jones     2021-08-19  2244  		asus->platform_profile_handler.choices);
c63d44ae602419 Luke D. Jones     2021-08-19  2245  	set_bit(PLATFORM_PROFILE_PERFORMANCE,
c63d44ae602419 Luke D. Jones     2021-08-19  2246  		asus->platform_profile_handler.choices);
c63d44ae602419 Luke D. Jones     2021-08-19  2247  
c63d44ae602419 Luke D. Jones     2021-08-19  2248  	err = platform_profile_register(&asus->platform_profile_handler);
c63d44ae602419 Luke D. Jones     2021-08-19  2249  	if (err)
c63d44ae602419 Luke D. Jones     2021-08-19  2250  		return err;
c63d44ae602419 Luke D. Jones     2021-08-19  2251  
c63d44ae602419 Luke D. Jones     2021-08-19  2252  	asus->platform_profile_support = true;
c63d44ae602419 Luke D. Jones     2021-08-19  2253  	return 0;
c63d44ae602419 Luke D. Jones     2021-08-19  2254  }
c63d44ae602419 Luke D. Jones     2021-08-19  2255  

---
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: 34853 bytes --]

      parent reply	other threads:[~2021-10-29  0:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 21:03 [PATCH v2] ACPI: platform_profile: Add support for notification chains Mario Limonciello
2021-10-26 11:31 ` kernel test robot
2021-10-29  0:58 ` kernel test robot [this message]

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=202110290851.d6ReiRwO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mario.limonciello@amd.com \
    --cc=markpearson@lenovo.com \
    --cc=pobrn@protonmail.com \
    --cc=rjw@rjwysocki.net \
    /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