* [linux-platform-drivers-x86:review-andy 46/48] drivers/platform/x86/thinkpad_acpi.c:1415:31: error: passing argument 1 of '__sysfs_match_string' from incompatible pointer type
@ 2020-05-11 17:54 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-11 17:54 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9191 bytes --]
tree: git://git.infradead.org/linux-platform-drivers-x86 review-andy
head: 0eae55af4ee950abf01cdfe5043b5f9ee89fa0fb
commit: 2002162229e11436cb85c763dbfd30eff904bcee [46/48] platform/x86: thinkpad_acpi: Convert to use sysfs_match_string()
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 2002162229e11436cb85c763dbfd30eff904bcee
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/platform/x86/thinkpad_acpi.c:256:2: warning: excess elements in scalar initializer
"on",
^~~~
drivers/platform/x86/thinkpad_acpi.c:256:2: note: (near initialization for 'on_off_cmd')
drivers/platform/x86/thinkpad_acpi.c:261:2: warning: excess elements in scalar initializer
"enable",
^~~~~~~~
drivers/platform/x86/thinkpad_acpi.c:261:2: note: (near initialization for 'enable_disable_cmd')
In file included from include/linux/bits.h:23:0,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/platform/x86/thinkpad_acpi.c:37:
drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_rfk_procfs_write':
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
include/linux/compiler.h:357:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^~~~~~~~~~~~~~~~~
include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~
>> include/linux/string.h:209:61: note: in expansion of macro 'ARRAY_SIZE'
#define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
^~~~~~~~~~
>> drivers/platform/x86/thinkpad_acpi.c:1415:12: note: in expansion of macro 'sysfs_match_string'
status = sysfs_match_string(enable_disable_cmd, cmd);
^~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9:0,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/platform/x86/thinkpad_acpi.c:38:
>> drivers/platform/x86/thinkpad_acpi.c:1415:31: error: passing argument 1 of '__sysfs_match_string' from incompatible pointer type [-Werror=incompatible-pointer-types]
status = sysfs_match_string(enable_disable_cmd, cmd);
^
include/linux/string.h:209:57: note: in definition of macro 'sysfs_match_string'
#define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
^~
include/linux/string.h:200:5: note: expected 'const char * const*' but argument is of type 'const char * const'
int __sysfs_match_string(const char * const *array, size_t n, const char *s);
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from drivers/platform/x86/thinkpad_acpi.c:37:
include/linux/kern_levels.h:5:18: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
>> drivers/platform/x86/thinkpad_acpi.c:434:10: note: in expansion of macro 'KERN_DEBUG'
printk(KERN_DEBUG pr_fmt("%s: PID %d: " format), \
^~~~~~~~~~
>> drivers/platform/x86/thinkpad_acpi.c:1423:2: note: in expansion of macro 'tpacpi_disclose_usertask'
tpacpi_disclose_usertask("procfs", "attempt to %s %s\n",
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:23:0,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from drivers/platform/x86/thinkpad_acpi.c:37:
drivers/platform/x86/thinkpad_acpi.c: In function 'light_write':
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
include/linux/compiler.h:357:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^~~~~~~~~~~~~~~~~
include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~
>> include/linux/string.h:209:61: note: in expansion of macro 'ARRAY_SIZE'
#define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
^~~~~~~~~~
drivers/platform/x86/thinkpad_acpi.c:5646:15: note: in expansion of macro 'sysfs_match_string'
newstatus = sysfs_match_string(on_off_cmd, cmd);
^~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9:0,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/platform/x86/thinkpad_acpi.c:38:
drivers/platform/x86/thinkpad_acpi.c:5646:34: error: passing argument 1 of '__sysfs_match_string' from incompatible pointer type [-Werror=incompatible-pointer-types]
newstatus = sysfs_match_string(on_off_cmd, cmd);
^
include/linux/string.h:209:57: note: in definition of macro 'sysfs_match_string'
#define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
^~
include/linux/string.h:200:5: note: expected 'const char * const*' but argument is of type 'const char * const'
int __sysfs_match_string(const char * const *array, size_t n, const char *s);
^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__sysfs_match_string +1415 drivers/platform/x86/thinkpad_acpi.c
1405
1406 static int tpacpi_rfk_procfs_write(const enum tpacpi_rfk_id id, char *buf)
1407 {
1408 char *cmd;
1409 int res, status = -EINVAL;
1410
1411 if (id >= TPACPI_RFK_SW_MAX)
1412 return -ENODEV;
1413
1414 while ((cmd = strsep(&buf, ","))) {
> 1415 status = sysfs_match_string(enable_disable_cmd, cmd);
1416 if (status < 0)
1417 return status;
1418 }
1419
1420 if (status < 0)
1421 return 0;
1422
> 1423 tpacpi_disclose_usertask("procfs", "attempt to %s %s\n",
1424 enable_disable_cmd[status],
1425 tpacpi_rfkill_names[id]);
1426 res = (tpacpi_rfkill_switches[id]->ops->set_status)(status);
1427 tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[id]);
1428
1429 return res;
1430 }
1431
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 51469 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-11 17:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 17:54 [linux-platform-drivers-x86:review-andy 46/48] drivers/platform/x86/thinkpad_acpi.c:1415:31: error: passing argument 1 of '__sysfs_match_string' from incompatible pointer type kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.