CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: citral23 <[email protected]>
TO: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

Hi citral23,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on robh/for-next linux/master linus/master v5.14-rc2 
next-20210721]
[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/citral23/iio-adc-ingenic-rename-has_aux2-to-has_aux_md/20210721-200734
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: i386-randconfig-m021-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.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/ingenic-adc.c:660 ingenic_adc_read_chan_info_raw() error: 
uninitialized symbol 'cmd'.

vim +/cmd +660 drivers/iio/adc/ingenic-adc.c

1a78daea107ddb Artur Rojek 2019-02-04  630  
1a99dc467943c0 Artur Rojek 2020-07-19  631  static int 
ingenic_adc_read_chan_info_raw(struct iio_dev *iio_dev,
1a78daea107ddb Artur Rojek 2019-02-04  632                                      
  struct iio_chan_spec const *chan,
a515d648850546 Artur Rojek 2019-07-27  633                                      
  int *val)
1a78daea107ddb Artur Rojek 2019-02-04  634  {
36c0cfb740f32b citral23    2021-07-21  635      int cmd, ret, engine = 
(chan->channel == INGENIC_ADC_BATTERY);
1a99dc467943c0 Artur Rojek 2020-07-19  636      struct ingenic_adc *adc = 
iio_priv(iio_dev);
1a99dc467943c0 Artur Rojek 2020-07-19  637  
1a99dc467943c0 Artur Rojek 2020-07-19  638      ret = clk_enable(adc->clk);
1a99dc467943c0 Artur Rojek 2020-07-19  639      if (ret) {
1a99dc467943c0 Artur Rojek 2020-07-19  640              
dev_err(iio_dev->dev.parent, "Failed to enable clock: %d\n",
1a99dc467943c0 Artur Rojek 2020-07-19  641                      ret);
1a99dc467943c0 Artur Rojek 2020-07-19  642              return ret;
1a99dc467943c0 Artur Rojek 2020-07-19  643      }
1a78daea107ddb Artur Rojek 2019-02-04  644  
36c0cfb740f32b citral23    2021-07-21  645      /* We cannot sample the aux 
channels in parallel. */
a515d648850546 Artur Rojek 2019-07-27  646      mutex_lock(&adc->aux_lock);
35cf95a30e2df9 citral23    2021-07-21  647      if (adc->soc_data->has_aux_md 
&& engine == 0) {
36c0cfb740f32b citral23    2021-07-21  648              switch (chan->channel) {
36c0cfb740f32b citral23    2021-07-21  649              case INGENIC_ADC_AUX0:
36c0cfb740f32b citral23    2021-07-21  650                      cmd = 0;
36c0cfb740f32b citral23    2021-07-21  651                      break;
36c0cfb740f32b citral23    2021-07-21  652              case INGENIC_ADC_AUX:
36c0cfb740f32b citral23    2021-07-21  653                      cmd = 1;
36c0cfb740f32b citral23    2021-07-21  654                      break;
36c0cfb740f32b citral23    2021-07-21  655              case INGENIC_ADC_AUX2:
36c0cfb740f32b citral23    2021-07-21  656                      cmd = 2;
36c0cfb740f32b citral23    2021-07-21  657                      break;
36c0cfb740f32b citral23    2021-07-21  658              }
36c0cfb740f32b citral23    2021-07-21  659               
36c0cfb740f32b citral23    2021-07-21 @660              
ingenic_adc_set_config(adc, JZ_ADC_REG_CFG_AUX_MD, cmd);
1a78daea107ddb Artur Rojek 2019-02-04  661      }
1a78daea107ddb Artur Rojek 2019-02-04  662  
a515d648850546 Artur Rojek 2019-07-27  663      ret = ingenic_adc_capture(adc, 
engine);
a515d648850546 Artur Rojek 2019-07-27  664      if (ret)
a515d648850546 Artur Rojek 2019-07-27  665              goto out;
a515d648850546 Artur Rojek 2019-07-27  666  
1a78daea107ddb Artur Rojek 2019-02-04  667      switch (chan->channel) {
36c0cfb740f32b citral23    2021-07-21  668      case INGENIC_ADC_AUX0:
1a78daea107ddb Artur Rojek 2019-02-04  669      case INGENIC_ADC_AUX:
a515d648850546 Artur Rojek 2019-07-27  670      case INGENIC_ADC_AUX2:
1a78daea107ddb Artur Rojek 2019-02-04  671              *val = readw(adc->base 
+ JZ_ADC_REG_ADSDAT);
1a78daea107ddb Artur Rojek 2019-02-04  672              break;
1a78daea107ddb Artur Rojek 2019-02-04  673      case INGENIC_ADC_BATTERY:
1a78daea107ddb Artur Rojek 2019-02-04  674              *val = readw(adc->base 
+ JZ_ADC_REG_ADBDAT);
1a78daea107ddb Artur Rojek 2019-02-04  675              break;
1a78daea107ddb Artur Rojek 2019-02-04  676      }
1a78daea107ddb Artur Rojek 2019-02-04  677  
a515d648850546 Artur Rojek 2019-07-27  678      ret = IIO_VAL_INT;
a515d648850546 Artur Rojek 2019-07-27  679  out:
a515d648850546 Artur Rojek 2019-07-27  680      mutex_unlock(&adc->aux_lock);
1a99dc467943c0 Artur Rojek 2020-07-19  681      clk_disable(adc->clk);
1a78daea107ddb Artur Rojek 2019-02-04  682  
a515d648850546 Artur Rojek 2019-07-27  683      return ret;
a515d648850546 Artur Rojek 2019-07-27  684  }
a515d648850546 Artur Rojek 2019-07-27  685  

---
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