lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202301100932.L3n6GguW-lkp@intel.com>
Date:   Tue, 10 Jan 2023 09:14:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Denis Pauk <pauk.denis@...il.com>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        ahmad@...lifa.ws, chunkeey@...il.com, greg@...pto.org,
        hubert.banas@...il.com, igor@...lig.com, jaap.dehaan@...enet.de,
        jdelvare@...e.com, jeroen@...rstra.org, jonfarr87@...il.com,
        jwp@...hat.com, kdudka@...hat.com, kernel@...in.net,
        kpietrzak@...root.org, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux@...ck-us.net, me@...toor.com,
        metalcaedes@...il.com, michael@...oddone.net,
        mikhail.v.gavrilov@...il.com, mundanedefoliation@...il.com,
        nephartyz@...il.com, oleksandr@...alenko.name,
        pauk.denis@...il.com, pehlm@...holm.org, renedis@...mail.com,
        robert@...ecki.net, sahan.h.fernando@...il.com,
        sebastian.arnhold@...teo.de, sefoci9222@...unway.com
Subject: Re: [PATCH v2 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI
 method

Hi Denis,

I love your patch! Yet something to improve:

[auto build test ERROR on b0587c87abc891e313d63946ff8c9f4939d1ea1a]

url:    https://github.com/intel-lab-lkp/linux/commits/Denis-Pauk/hwmon-nct6775-B650-B660-X670-ASUS-boards-support/20230110-051917
base:   b0587c87abc891e313d63946ff8c9f4939d1ea1a
patch link:    https://lore.kernel.org/r/20230109211508.4969-1-pauk.denis%40gmail.com
patch subject: [PATCH v2 1/2] hwmon: (nct6775) Directly call ASUS ACPI WMI method
config: x86_64-buildonly-randconfig-r004-20230109
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/7cc524a49c17a240b048e24a91305c6159131aed
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Denis-Pauk/hwmon-nct6775-B650-B660-X670-ASUS-boards-support/20230110-051917
        git checkout 7cc524a49c17a240b048e24a91305c6159131aed
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/hwmon/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

>> drivers/hwmon/nct6775-platform.c:1116:29: error: implicit declaration of function 'to_acpi_device' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           struct acpi_device *adev = to_acpi_device(dev);
                                      ^
>> drivers/hwmon/nct6775-platform.c:1116:22: warning: incompatible integer to pointer conversion initializing 'struct acpi_device *' with an expression of type 'int' [-Wint-conversion]
           struct acpi_device *adev = to_acpi_device(dev);
                               ^      ~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/nct6775-platform.c:1117:20: error: implicit declaration of function 'acpi_device_uid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           const char *uid = acpi_device_uid(adev);
                             ^
>> drivers/hwmon/nct6775-platform.c:1117:14: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
           const char *uid = acpi_device_uid(adev);
                       ^     ~~~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/nct6775-platform.c:1118:20: error: implicit declaration of function 'acpi_device_hid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           const char *hid = acpi_device_hid(adev);
                             ^
   drivers/hwmon/nct6775-platform.c:1118:20: note: did you mean 'acpi_device_uid'?
   drivers/hwmon/nct6775-platform.c:1117:20: note: 'acpi_device_uid' declared here
           const char *uid = acpi_device_uid(adev);
                             ^
   drivers/hwmon/nct6775-platform.c:1118:14: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
           const char *hid = acpi_device_hid(adev);
                       ^     ~~~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/nct6775-platform.c:1135:2: error: implicit declaration of function 'acpi_bus_for_each_dev' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           acpi_bus_for_each_dev(nct6775_asuswmi_device_match, &arg);
           ^
   drivers/hwmon/nct6775-platform.c:1135:2: note: did you mean 'bus_for_each_dev'?
   include/linux/device/bus.h:164:5: note: 'bus_for_each_dev' declared here
   int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
       ^
   3 warnings and 4 errors generated.


vim +/to_acpi_device +1116 drivers/hwmon/nct6775-platform.c

  1109	
  1110	/*
  1111	 * Callback for acpi_bus_for_each_dev() to find the right device
  1112	 * by _UID and _HID and store to each_device_arg.
  1113	 */
  1114	static int nct6775_asuswmi_device_match(struct device *dev, void *data)
  1115	{
> 1116		struct acpi_device *adev = to_acpi_device(dev);
> 1117		const char *uid = acpi_device_uid(adev);
> 1118		const char *hid = acpi_device_hid(adev);
  1119		struct each_device_arg *arg = data;
  1120	
  1121		if (hid && !strcmp(hid, ASUSWMI_DEVICE_HID) &&
  1122			uid && !strcmp(uid, arg->match)) {
  1123			arg->adev = adev;
  1124		}
  1125	
  1126		return 0;
  1127	}
  1128	
  1129	static enum sensor_access nct6775_determine_access(const char *device_uid)
  1130	{
  1131		struct each_device_arg arg;
  1132		u8 tmp;
  1133	
  1134		arg.match = device_uid;
> 1135		acpi_bus_for_each_dev(nct6775_asuswmi_device_match, &arg);
  1136		if (!arg.adev)
  1137			return access_direct;
  1138	
  1139		asus_acpi_dev = arg.adev;
  1140		/* if reading chip id via ACPI succeeds, use WMI "WMBD" method for access */
  1141		if (!nct6775_asuswmi_read(0, NCT6775_PORT_CHIPID, &tmp) && tmp) {
  1142			pr_debug("Using Asus WMBD method of %s to access %#x chip.\n", device_uid, tmp);
  1143			return access_asuswmi;
  1144		}
  1145	
  1146		return access_direct;
  1147	}
  1148	

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

View attachment "config" of type "text/plain" (154343 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ