Re: [PATCH] staging: comedi: cb_pcidas64: Fixed coding issue about multiple line dereferencing

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

 



Hi devendra,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.9 next-20161219]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/devendra-sharma/staging-comedi-cb_pcidas64-Fixed-coding-issue-about-multiple-line-dereferencing/20161220-020116
config: x86_64-randconfig-x017-201651 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/staging/comedi/drivers/cb_pcidas64.c: In function 'setup_channel_queue':
>> drivers/staging/comedi/drivers/cb_pcidas64.c:2478:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
        unsigned int ch = cmd->chanlist[i];
        ^~~~~~~~

vim +2478 drivers/staging/comedi/drivers/cb_pcidas64.c

  2462				/* use external queue */
  2463				if (dev->write_subdev && dev->write_subdev->busy) {
  2464					warn_external_queue(dev);
  2465					return -EBUSY;
  2466				}
  2467				devpriv->hw_config_bits |= EXT_QUEUE_BIT;
  2468				writew(devpriv->hw_config_bits,
  2469				       devpriv->main_iobase + HW_CONFIG_REG);
  2470				/* clear DAC buffer to prevent weird interactions */
  2471				writew(0,
  2472				       devpriv->main_iobase + DAC_BUFFER_CLEAR_REG);
  2473				/* clear queue pointer */
  2474				writew(0, devpriv->main_iobase + ADC_QUEUE_CLEAR_REG);
  2475				/* load external queue */
  2476				for (i = 0; i < cmd->chanlist_len; i++) {
  2477					bits = 0;
> 2478					unsigned int ch = cmd->chanlist[i];
  2479					/* set channel */
  2480					bits |= adc_chan_bits(CR_CHAN(ch));
  2481					/* set gain */
  2482					bits |= ai_range_bits_6xxx(dev,
  2483								   CR_RANGE(ch));
  2484					/* set single-ended / differential */
  2485					bits |= se_diff_bit_6xxx(dev,
  2486								 CR_AREF(ch) ==

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux