drivers/platform/x86/thinkpad_acpi.c:9270: warning: Function parameter or member 'method' not described in 'tpacpi_battery_acpi_eval'

From: kernel test robot
Date: Fri Nov 10 2023 - 13:08:51 EST


Hi Ognjen,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89cdf9d556016a54ff6ddd62324aa5ec790c05cc
commit: 2801b9683f740012863f7f0b1f0bc770c417fe72 thinkpad_acpi: Add support for battery thresholds
date: 6 years ago
config: i386-randconfig-004-20230904 (https://download.01.org/0day-ci/archive/20231110/202311101401.V95EdtRq-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231110/202311101401.V95EdtRq-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311101401.V95EdtRq-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/platform/x86/thinkpad_acpi.c: In function 'create_attr_set':
drivers/platform/x86/thinkpad_acpi.c:1034:31: warning: taking address of packed member of 'struct attribute_set_obj' may result in an unaligned pointer value [-Waddress-of-packed-member]
1034 | sobj->s.group.attrs = &sobj->a;
| ^~~~~~~~
drivers/platform/x86/thinkpad_acpi.c:1037:16: warning: taking address of packed member of 'struct attribute_set_obj' may result in an unaligned pointer value [-Waddress-of-packed-member]
1037 | return &sobj->s;
| ^~~~~~~~
drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_battery_store':
drivers/platform/x86/thinkpad_acpi.c:9451:27: warning: comparison of unsigned expression in '< 0' is always false [-Wtype-limits]
9451 | if (value < 0 || value > 99)
| ^
drivers/platform/x86/thinkpad_acpi.c: In function 'thermal_get_sensor':
drivers/platform/x86/thinkpad_acpi.c:6224:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
6224 | if (idx >= 8 && idx <= 15) {
| ^
drivers/platform/x86/thinkpad_acpi.c:6230:9: note: here
6230 | case TPACPI_THERMAL_TPEC_8:
| ^~~~
drivers/platform/x86/thinkpad_acpi.c: In function 'hotkey_notify':
drivers/platform/x86/thinkpad_acpi.c:4181:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
4181 | if (tp_features.hotkey_wlsw &&
| ^
drivers/platform/x86/thinkpad_acpi.c:4189:17: note: here
4189 | default:
| ^~~~~~~
>> drivers/platform/x86/thinkpad_acpi.c:9270: warning: Function parameter or member 'method' not described in 'tpacpi_battery_acpi_eval'
>> drivers/platform/x86/thinkpad_acpi.c:9270: warning: Function parameter or member 'ret' not described in 'tpacpi_battery_acpi_eval'
>> drivers/platform/x86/thinkpad_acpi.c:9270: warning: Function parameter or member 'param' not described in 'tpacpi_battery_acpi_eval'


vim +9270 drivers/platform/x86/thinkpad_acpi.c

9263
9264 /**
9265 * This evaluates a ACPI method call specific to the battery
9266 * ACPI extension. The specifics are that an error is marked
9267 * in the 32rd bit of the response, so we just check that here.
9268 */
9269 static acpi_status tpacpi_battery_acpi_eval(char *method, int *ret, int param)
> 9270 {
9271 int response;
9272
9273 if (!acpi_evalf(hkey_handle, &response, method, "dd", param)) {
9274 acpi_handle_err(hkey_handle, "%s: evaluate failed", method);
9275 return AE_ERROR;
9276 }
9277 if (response & METHOD_ERR) {
9278 acpi_handle_err(hkey_handle,
9279 "%s evaluated but flagged as error", method);
9280 return AE_ERROR;
9281 }
9282 *ret = response;
9283 return AE_OK;
9284 }
9285

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