Re: [PATCH 4/4] drivers core: Miscellaneous changes for sysfs_emit

kernel test robot
2020-09-07T23:00:59Z

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

Hi Joe,

I love your patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on pm/linux-next linus/master v5.9-rc4 next-20200903]
[cannot apply to linux/master]
[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/Joe-Perches/drivers-core-Use-sysfs_emit-functions/20200908-021333
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 4024823563d05bbe880885c9987d14a7130801da
config: h8300-randconfig-r005-20200908 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300

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/base/class.c: In function 'show_class_attr_string':
>> drivers/base/class.c:481:9: error: implicit declaration of function 'sysfs_emit'; did you mean 'sysfs_init'? [-Werror=implicit-function-declaration]
481 | return sysfs_emit(buf, "%s\n", cs->str);
| ^~~~~~~~~~
| sysfs_init
cc1: some warnings being treated as errors
--
drivers/base/cpu.c: In function 'print_cpus_kernel_max':
drivers/base/cpu.c:234:9: error: implicit declaration of function 'sysfs_emit'; did you mean 'sysfs_init'? [-Werror=implicit-function-declaration]
234 | return sysfs_emit(buf, "%d\n", NR_CPUS - 1);
| ^~~~~~~~~~
| sysfs_init
drivers/base/cpu.c: In function 'print_cpus_offline':
>> drivers/base/cpu.c:251:9: error: implicit declaration of function 'sysfs_emit_at'; did you mean 'sysfs_init'? [-Werror=implicit-function-declaration]
251 | len += sysfs_emit_at(buf, len, "%*pbl", cpumask_pr_args(offline));
| ^~~~~~~~~~~~~
| sysfs_init
cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/0c3c0f3efcf691e49eaf0745d0b86f5ab991d989
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joe-Perches/drivers-core-Use-sysfs_emit-functions/20200908-021333
git checkout 0c3c0f3efcf691e49eaf0745d0b86f5ab991d989
vim +481 drivers/base/class.c

474
475 ssize_t show_class_attr_string(struct class *class,
476 struct class_attribute *attr, char *buf)
477 {
478 struct class_attribute_string *cs;
479
480 cs = container_of(attr, struct class_attribute_string, attr);
> 481 return sysfs_emit(buf, "%s\n", cs->str);
482 }
483

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