CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Miquel Raynal <[email protected]>
TO: Jonathan Cameron <[email protected]>
TO: "Lars-Peter Clausen" <[email protected]>
CC: Thomas Petazzoni <[email protected]>
CC: [email protected]
CC: [email protected]
CC: Miquel Raynal <[email protected]>

Hi Miquel,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on linux/master linus/master v5.14-rc6 next-20210818]
[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/Miquel-Raynal/Bring-software-triggers-support-to-MAX1027-like-ADCs/20210818-191619
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: i386-randconfig-m021-20210818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/iio/adc/max1027.c:366 max1027_read_raw() warn: inconsistent returns 
'&st->lock'.

vim +366 drivers/iio/adc/max1027.c

fc167f62483325 Philippe Reynes 2014-06-14  326  
fc167f62483325 Philippe Reynes 2014-06-14  327  static int 
max1027_read_raw(struct iio_dev *indio_dev,
fc167f62483325 Philippe Reynes 2014-06-14  328                              
struct iio_chan_spec const *chan,
fc167f62483325 Philippe Reynes 2014-06-14  329                              int 
*val, int *val2, long mask)
fc167f62483325 Philippe Reynes 2014-06-14  330  {
fc167f62483325 Philippe Reynes 2014-06-14  331          int ret = 0;
fc167f62483325 Philippe Reynes 2014-06-14  332          struct max1027_state 
*st = iio_priv(indio_dev);
fc167f62483325 Philippe Reynes 2014-06-14  333  
fc167f62483325 Philippe Reynes 2014-06-14  334          mutex_lock(&st->lock);
fc167f62483325 Philippe Reynes 2014-06-14  335  
fc167f62483325 Philippe Reynes 2014-06-14  336          switch (mask) {
fc167f62483325 Philippe Reynes 2014-06-14  337          case IIO_CHAN_INFO_RAW:
69515d07652c09 Miquel Raynal   2021-08-18  338                  if 
(iio_buffer_enabled(indio_dev))
69515d07652c09 Miquel Raynal   2021-08-18  339                          return 
-EBUSY;
fc167f62483325 Philippe Reynes 2014-06-14  340                  ret = 
max1027_read_single_value(indio_dev, chan, val);
fc167f62483325 Philippe Reynes 2014-06-14  341                  break;
fc167f62483325 Philippe Reynes 2014-06-14  342          case 
IIO_CHAN_INFO_SCALE:
fc167f62483325 Philippe Reynes 2014-06-14  343                  switch 
(chan->type) {
fc167f62483325 Philippe Reynes 2014-06-14  344                  case IIO_TEMP:
fc167f62483325 Philippe Reynes 2014-06-14  345                          *val = 
1;
fc167f62483325 Philippe Reynes 2014-06-14  346                          *val2 = 
8;
fc167f62483325 Philippe Reynes 2014-06-14  347                          ret = 
IIO_VAL_FRACTIONAL;
fc167f62483325 Philippe Reynes 2014-06-14  348                          break;
fc167f62483325 Philippe Reynes 2014-06-14  349                  case 
IIO_VOLTAGE:
fc167f62483325 Philippe Reynes 2014-06-14  350                          *val = 
2500;
7af5257d84275c Miquel Raynal   2019-10-11  351                          *val2 = 
chan->scan_type.realbits;
fc167f62483325 Philippe Reynes 2014-06-14  352                          ret = 
IIO_VAL_FRACTIONAL_LOG2;
fc167f62483325 Philippe Reynes 2014-06-14  353                          break;
fc167f62483325 Philippe Reynes 2014-06-14  354                  default:
fc167f62483325 Philippe Reynes 2014-06-14  355                          ret = 
-EINVAL;
fc167f62483325 Philippe Reynes 2014-06-14  356                          break;
fc167f62483325 Philippe Reynes 2014-06-14  357                  }
fc167f62483325 Philippe Reynes 2014-06-14  358                  break;
fc167f62483325 Philippe Reynes 2014-06-14  359          default:
fc167f62483325 Philippe Reynes 2014-06-14  360                  ret = -EINVAL;
fc167f62483325 Philippe Reynes 2014-06-14  361                  break;
fc167f62483325 Philippe Reynes 2014-06-14  362          }
fc167f62483325 Philippe Reynes 2014-06-14  363  
fc167f62483325 Philippe Reynes 2014-06-14  364          mutex_unlock(&st->lock);
fc167f62483325 Philippe Reynes 2014-06-14  365  
fc167f62483325 Philippe Reynes 2014-06-14 @366          return ret;
fc167f62483325 Philippe Reynes 2014-06-14  367  }
fc167f62483325 Philippe Reynes 2014-06-14  368  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to