Re: [PATCH 2/2] nvmem: expose NVMEM cells in sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "Rafał,

I love your patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on char-misc/char-misc-testing linux/master linus/master v5.16-rc6 next-20211217]
[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/Rafa-Mi-ecki/sysfs-add-sysfs_add_bin_file_to_group/20211220-144856
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git aa483f3ce655ed9ee4f32d050d1822eec2d20ada
config: m68k-m5208evb_defconfig (https://download.01.org/0day-ci/archive/20211220/202112202227.nt77aHJ2-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 11.2.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
        # https://github.com/0day-ci/linux/commit/8408088794497c22b0fd47fe2f5e5add1ab00ec9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rafa-Mi-ecki/sysfs-add-sysfs_add_bin_file_to_group/20211220-144856
        git checkout 8408088794497c22b0fd47fe2f5e5add1ab00ec9
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/nvmem/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/nvmem/core.c: In function 'nvmem_cell_entry_drop':
   drivers/nvmem/core.c:452:38: error: 'nvmem_cells_group' undeclared (first use in this function); did you mean 'nvmem_cell_lookup'?
     452 |                                      nvmem_cells_group.name);
         |                                      ^~~~~~~~~~~~~~~~~
         |                                      nvmem_cell_lookup
   drivers/nvmem/core.c:452:38: note: each undeclared identifier is reported only once for each function it appears in
   drivers/nvmem/core.c: In function 'nvmem_cell_entry_add':
>> drivers/nvmem/core.c:509:15: error: implicit declaration of function 'sysfs_add_bin_file_to_group'; did you mean 'sysfs_add_file_to_group'? [-Werror=implicit-function-declaration]
     509 |         err = sysfs_add_bin_file_to_group(&dev->kobj, &cell->battr,
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |               sysfs_add_file_to_group
   drivers/nvmem/core.c:510:43: error: 'nvmem_cells_group' undeclared (first use in this function); did you mean 'nvmem_cell_lookup'?
     510 |                                           nvmem_cells_group.name);
         |                                           ^~~~~~~~~~~~~~~~~
         |                                           nvmem_cell_lookup
   cc1: some warnings being treated as errors


vim +509 drivers/nvmem/core.c

   495	
   496	static void nvmem_cell_entry_add(struct nvmem_cell_entry *cell)
   497	{
   498		struct device *dev = &cell->nvmem->dev;
   499		int err;
   500	
   501		mutex_lock(&nvmem_mutex);
   502		list_add_tail(&cell->node, &cell->nvmem->cells);
   503		mutex_unlock(&nvmem_mutex);
   504	
   505		sysfs_attr_init(&cell->battr.attr);
   506		cell->battr.attr.name = cell->name;
   507		cell->battr.attr.mode = 0400;
   508		cell->battr.read = nvmem_cell_attr_read;
 > 509		err = sysfs_add_bin_file_to_group(&dev->kobj, &cell->battr,
   510						  nvmem_cells_group.name);
   511		if (err)
   512			dev_warn(dev, "Failed to add %s cell: %d\n", cell->name, err);
   513	
   514		blocking_notifier_call_chain(&nvmem_notifier, NVMEM_CELL_ADD, cell);
   515	}
   516	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux