tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
hwmon-next
head:   b14a1f7369f2acadb78678402f03feb33d032e6d
commit: 8d719d6f3e97a0221e06670e2d0b89b327468bad [2/11] hwmon: (pmbus/core) 
mutex_lock write in pmbus_set_samples
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8d719d6f3e97a0221e06670e2d0b89b327468bad
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

   In file included from include/linux/notifier.h:14:0,
                    from include/linux/memory_hotplug.h:7,
                    from include/linux/mmzone.h:802,
                    from include/linux/gfp.h:6,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:31,
                    from include/linux/fs.h:15,
                    from include/linux/debugfs.h:15,
                    from drivers/hwmon/pmbus/pmbus_core.c:9:
   drivers/hwmon/pmbus/pmbus_core.c: In function 'pmbus_set_samples':
>> drivers/hwmon/pmbus/pmbus_core.c:1949:14: error: 'data' undeclared (first 
>> use in this function); did you mean '_data'?
     mutex_lock(&data->update_lock);
                 ^
   include/linux/mutex.h:166:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~
   drivers/hwmon/pmbus/pmbus_core.c:1949:14: note: each undeclared identifier 
is reported only once for each function it appears in
     mutex_lock(&data->update_lock);
                 ^
   include/linux/mutex.h:166:44: note: in definition of macro 'mutex_lock'
    #define mutex_lock(lock) mutex_lock_nested(lock, 0)
                                               ^~~~

vim +1949 drivers/hwmon/pmbus/pmbus_core.c

  1936  
  1937  static ssize_t pmbus_set_samples(struct device *dev,
  1938                                   struct device_attribute *devattr,
  1939                                   const char *buf, size_t count)
  1940  {
  1941          int ret;
  1942          long val;
  1943          struct i2c_client *client = to_i2c_client(dev->parent);
  1944          struct pmbus_samples_reg *reg = to_samples_reg(devattr);
  1945  
  1946          if (kstrtol(buf, 0, &val) < 0)
  1947                  return -EINVAL;
  1948  
> 1949          mutex_lock(&data->update_lock);
  1950          ret = _pmbus_write_word_data(client, reg->page, reg->attr->reg, 
val);
  1951          mutex_unlock(&data->update_lock);
  1952  
  1953          return ret ? : count;
  1954  }
  1955  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to