[android-common:android16-6.12-desktop 1/1] drivers/platform/x86/acer-wmi.c:1944:49: error: passing argument 1 of 'platform_profile_register' from incompatible pointer type

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Kurt,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android16-6.12-desktop
head:   24c37396da197463e1ff2bc69bb789e34dacad53
commit: 0563cdc99811697cb675ce01bb57360413f3cd2a [1/1] BACKPORT: UPSTREAM: ACPI: platform_profile: Remove platform_profile_handler from exported symbols
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20260813/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   drivers/platform/x86/acer-wmi.c: In function 'acer_platform_profile_setup':
   drivers/platform/x86/acer-wmi.c:1928:41: error: 'struct platform_profile_handler' has no member named 'profile_get'
    1928 |                 platform_profile_handler.profile_get =
         |                                         ^
   drivers/platform/x86/acer-wmi.c:1930:41: error: 'struct platform_profile_handler' has no member named 'profile_set'
    1930 |                 platform_profile_handler.profile_set =
         |                                         ^
>> drivers/platform/x86/acer-wmi.c:1944:49: error: passing argument 1 of 'platform_profile_register' from incompatible pointer type [-Wincompatible-pointer-types]
    1944 |                 err = platform_profile_register(&platform_profile_handler);
         |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                 |
         |                                                 struct platform_profile_handler *
   In file included from drivers/platform/x86/acer-wmi.c:22:
   include/linux/platform_profile.h:48:57: note: expected 'struct device *' but argument is of type 'struct platform_profile_handler *'
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                                          ~~~~~~~~~~~~~~~^~~
   drivers/platform/x86/acer-wmi.c:1944:23: error: too few arguments to function 'platform_profile_register'
    1944 |                 err = platform_profile_register(&platform_profile_handler);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:48:16: note: declared here
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/acer-wmi.c: In function 'acer_thermal_profile_change':
   drivers/platform/x86/acer-wmi.c:2036:17: error: too few arguments to function 'platform_profile_notify'
    2036 |                 platform_profile_notify();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:56:6: note: declared here
      56 | void platform_profile_notify(struct device *dev);
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/acer-wmi.c: In function 'acer_platform_probe':
   drivers/platform/x86/acer-wmi.c:2598:17: error: too few arguments to function 'platform_profile_remove'
    2598 |                 platform_profile_remove();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:51:5: note: declared here
      51 | int platform_profile_remove(struct device *dev);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/acer-wmi.c: In function 'acer_platform_remove':
   drivers/platform/x86/acer-wmi.c:2621:17: error: too few arguments to function 'platform_profile_remove'
    2621 |                 platform_profile_remove();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:51:5: note: declared here
      51 | int platform_profile_remove(struct device *dev);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/platform/x86/thinkpad_acpi.c: In function 'dytc_profile_refresh':
   drivers/platform/x86/thinkpad_acpi.c:10603:17: error: too few arguments to function 'platform_profile_notify'
   10603 |                 platform_profile_notify();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/platform/x86/thinkpad_acpi.c:60:
   include/linux/platform_profile.h:56:6: note: declared here
      56 | void platform_profile_notify(struct device *dev);
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c: At top level:
   drivers/platform/x86/thinkpad_acpi.c:10608:10: error: 'struct platform_profile_handler' has no member named 'profile_get'
   10608 |         .profile_get = dytc_profile_get,
         |          ^~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c:10608:24: error: initialization of 'const char *' from incompatible pointer type 'int (*)(struct platform_profile_handler *, enum platform_profile_option *)' [-Wincompatible-pointer-types]
   10608 |         .profile_get = dytc_profile_get,
         |                        ^~~~~~~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c:10608:24: note: (near initialization for 'dytc_profile.name')
   drivers/platform/x86/thinkpad_acpi.c:10609:10: error: 'struct platform_profile_handler' has no member named 'profile_set'
   10609 |         .profile_set = dytc_profile_set,
         |          ^~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c:10609:24: error: initialization of 'struct device *' from incompatible pointer type 'int (*)(struct platform_profile_handler *, enum platform_profile_option)' [-Wincompatible-pointer-types]
   10609 |         .profile_set = dytc_profile_set,
         |                        ^~~~~~~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c:10609:24: note: (near initialization for 'dytc_profile.dev')
   drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_dytc_profile_init':
>> drivers/platform/x86/thinkpad_acpi.c:10681:41: error: passing argument 1 of 'platform_profile_register' from incompatible pointer type [-Wincompatible-pointer-types]
   10681 |         err = platform_profile_register(&dytc_profile);
         |                                         ^~~~~~~~~~~~~
         |                                         |
         |                                         struct platform_profile_handler *
   include/linux/platform_profile.h:48:57: note: expected 'struct device *' but argument is of type 'struct platform_profile_handler *'
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                                          ~~~~~~~~~~~~~~~^~~
   drivers/platform/x86/thinkpad_acpi.c:10681:15: error: too few arguments to function 'platform_profile_register'
   10681 |         err = platform_profile_register(&dytc_profile);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:48:16: note: declared here
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/thinkpad_acpi.c: In function 'dytc_profile_exit':
   drivers/platform/x86/thinkpad_acpi.c:10701:9: error: too few arguments to function 'platform_profile_remove'
   10701 |         platform_profile_remove();
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:51:5: note: declared here
      51 | int platform_profile_remove(struct device *dev);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/platform/x86/dell/dell-pc.c: In function 'thermal_init':
   drivers/platform/x86/dell/dell-pc.c:250:24: error: 'struct platform_profile_handler' has no member named 'profile_get'
     250 |         thermal_handler->profile_get = thermal_platform_profile_get;
         |                        ^~
   drivers/platform/x86/dell/dell-pc.c:251:24: error: 'struct platform_profile_handler' has no member named 'profile_set'
     251 |         thermal_handler->profile_set = thermal_platform_profile_set;
         |                        ^~
>> drivers/platform/x86/dell/dell-pc.c:263:41: error: passing argument 1 of 'platform_profile_register' from incompatible pointer type [-Wincompatible-pointer-types]
     263 |         ret = platform_profile_register(thermal_handler);
         |                                         ^~~~~~~~~~~~~~~
         |                                         |
         |                                         struct platform_profile_handler *
   In file included from drivers/platform/x86/dell/dell-pc.c:20:
   include/linux/platform_profile.h:48:57: note: expected 'struct device *' but argument is of type 'struct platform_profile_handler *'
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                                          ~~~~~~~~~~~~~~~^~~
   drivers/platform/x86/dell/dell-pc.c:263:15: error: too few arguments to function 'platform_profile_register'
     263 |         ret = platform_profile_register(thermal_handler);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:48:16: note: declared here
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/dell/dell-pc.c: In function 'thermal_cleanup':
   drivers/platform/x86/dell/dell-pc.c:275:17: error: too few arguments to function 'platform_profile_remove'
     275 |                 platform_profile_remove();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:51:5: note: declared here
      51 | int platform_profile_remove(struct device *dev);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/platform/x86/hp/hp-wmi.c: In function 'thermal_profile_setup':
   drivers/platform/x86/hp/hp-wmi.c:1585:41: error: 'struct platform_profile_handler' has no member named 'profile_get'
    1585 |                 platform_profile_handler.profile_get = platform_profile_omen_get;
         |                                         ^
   drivers/platform/x86/hp/hp-wmi.c:1586:41: error: 'struct platform_profile_handler' has no member named 'profile_set'
    1586 |                 platform_profile_handler.profile_set = platform_profile_omen_set;
         |                                         ^
   drivers/platform/x86/hp/hp-wmi.c:1602:41: error: 'struct platform_profile_handler' has no member named 'profile_get'
    1602 |                 platform_profile_handler.profile_get = platform_profile_victus_get;
         |                                         ^
   drivers/platform/x86/hp/hp-wmi.c:1603:41: error: 'struct platform_profile_handler' has no member named 'profile_set'
    1603 |                 platform_profile_handler.profile_set = platform_profile_victus_set;
         |                                         ^
   drivers/platform/x86/hp/hp-wmi.c:1620:41: error: 'struct platform_profile_handler' has no member named 'profile_get'
    1620 |                 platform_profile_handler.profile_get = hp_wmi_platform_profile_get;
         |                                         ^
   drivers/platform/x86/hp/hp-wmi.c:1621:41: error: 'struct platform_profile_handler' has no member named 'profile_set'
    1621 |                 platform_profile_handler.profile_set = hp_wmi_platform_profile_set;
         |                                         ^
>> drivers/platform/x86/hp/hp-wmi.c:1630:41: error: passing argument 1 of 'platform_profile_register' from incompatible pointer type [-Wincompatible-pointer-types]
    1630 |         err = platform_profile_register(&platform_profile_handler);
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         struct platform_profile_handler *
   In file included from drivers/platform/x86/hp/hp-wmi.c:24:
   include/linux/platform_profile.h:48:57: note: expected 'struct device *' but argument is of type 'struct platform_profile_handler *'
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                                          ~~~~~~~~~~~~~~~^~~
   drivers/platform/x86/hp/hp-wmi.c:1630:15: error: too few arguments to function 'platform_profile_register'
    1630 |         err = platform_profile_register(&platform_profile_handler);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:48:16: note: declared here
      48 | struct device *platform_profile_register(struct device *dev, const char *name,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/hp/hp-wmi.c: In function 'hp_wmi_bios_remove':
   drivers/platform/x86/hp/hp-wmi.c:1694:17: error: too few arguments to function 'platform_profile_remove'
    1694 |                 platform_profile_remove();
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_profile.h:51:5: note: declared here
      51 | int platform_profile_remove(struct device *dev);
         |     ^~~~~~~~~~~~~~~~~~~~~~~


vim +/platform_profile_register +1944 drivers/platform/x86/acer-wmi.c

6bb5153dfbaf88f SungHwan Jung 2023-11-24  1922  
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1923  static int acer_platform_profile_setup(void)
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1924  {
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1925  	if (quirks->predator_v4) {
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1926  		int err;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1927  
6bb5153dfbaf88f SungHwan Jung 2023-11-24 @1928  		platform_profile_handler.profile_get =
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1929  			acer_predator_v4_platform_profile_get;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1930  		platform_profile_handler.profile_set =
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1931  			acer_predator_v4_platform_profile_set;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1932  
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1933  		set_bit(PLATFORM_PROFILE_PERFORMANCE,
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1934  			platform_profile_handler.choices);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1935  		set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE,
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1936  			platform_profile_handler.choices);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1937  		set_bit(PLATFORM_PROFILE_BALANCED,
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1938  			platform_profile_handler.choices);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1939  		set_bit(PLATFORM_PROFILE_QUIET,
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1940  			platform_profile_handler.choices);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1941  		set_bit(PLATFORM_PROFILE_LOW_POWER,
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1942  			platform_profile_handler.choices);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1943  
6bb5153dfbaf88f SungHwan Jung 2023-11-24 @1944  		err = platform_profile_register(&platform_profile_handler);
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1945  		if (err)
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1946  			return err;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1947  
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1948  		platform_profile_support = true;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1949  
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1950  		/* Set default non-turbo profile  */
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1951  		last_non_turbo_profile =
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1952  			ACER_PREDATOR_V4_THERMAL_PROFILE_BALANCED_WMI;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1953  	}
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1954  	return 0;
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1955  }
6bb5153dfbaf88f SungHwan Jung 2023-11-24  1956  

:::::: The code at line 1944 was first introduced by commit
:::::: 6bb5153dfbaf88fa4b40ef50b706d2fb186ed92e platform/x86: acer-wmi: Add platform profile and mode key support for Predator PHN16-71

:::::: TO: SungHwan Jung <[email protected]>
:::::: CC: Hans de Goede <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.