Linux IIO development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: ranechita <ramona.nechita@analog.com>, linux-iio@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	ranechita <ramona.nechita@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Marcelo Schmitt <marcelo.schmitt@analog.com>,
	Marius Cristea <marius.cristea@microchip.com>,
	Maksim Kiselev <bigunclemax@gmail.com>,
	Marcus Folkesson <marcus.folkesson@gmail.com>,
	Okan Sahin <okan.sahin@analog.com>,
	Mike Looijmans <mike.looijmans@topic.nl>,
	Liam Beguin <liambeguin@gmail.com>,
	Ivan Mikhaylov <fr0st61te@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drivers: iio: adc: add support for ad777x family
Date: Fri, 31 May 2024 08:07:14 +0800	[thread overview]
Message-ID: <202405310747.6KO7w1V1-lkp@intel.com> (raw)
In-Reply-To: <20240529150322.28018-1-ramona.nechita@analog.com>

Hi ranechita,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.10-rc1 next-20240529]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/ranechita/drivers-iio-adc-add-support-for-ad777x-family/20240529-230814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20240529150322.28018-1-ramona.nechita%40analog.com
patch subject: [PATCH v2] drivers: iio: adc: add support for ad777x family
config: microblaze-randconfig-r113-20240531 (https://download.01.org/0day-ci/archive/20240531/202405310747.6KO7w1V1-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240531/202405310747.6KO7w1V1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405310747.6KO7w1V1-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/ad7779.c:571:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be32 @@     got unsigned long @@
   drivers/iio/adc/ad7779.c:571:35: sparse:     expected restricted __be32
   drivers/iio/adc/ad7779.c:571:35: sparse:     got unsigned long
>> drivers/iio/adc/ad7779.c:581:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be32 @@     got unsigned int [usertype] @@
   drivers/iio/adc/ad7779.c:581:42: sparse:     expected restricted __be32
   drivers/iio/adc/ad7779.c:581:42: sparse:     got unsigned int [usertype]
>> drivers/iio/adc/ad7779.c:685:35: sparse: sparse: symbol 'ad777x_buffer_setup_ops' was not declared. Should it be static?
   drivers/iio/adc/ad7779.c: note: in included file (through include/linux/mutex.h, include/linux/notifier.h, include/linux/clk.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true

vim +571 drivers/iio/adc/ad7779.c

   552	
   553	static irqreturn_t ad777x_irq_handler(int irq, void *data)
   554	{
   555		struct iio_dev *indio_dev = data;
   556		struct ad777x_state *st = iio_priv(indio_dev);
   557		int ret;
   558		__be32 tmp[8];
   559		int i;
   560		int k = 0;
   561	
   562		struct spi_transfer sd_readback_tr[] = {
   563			{
   564				.rx_buf = st->spidata_rx,
   565				.tx_buf = st->spidata_tx,
   566				.len = 32,
   567			}
   568		};
   569	
   570		if (iio_buffer_enabled(indio_dev)) {
 > 571			st->spidata_tx[0] = AD777X_SPI_READ_CMD;
   572			ret = spi_sync_transfer(st->spi, sd_readback_tr,
   573						ARRAY_SIZE(sd_readback_tr));
   574			if (ret) {
   575				dev_err(&st->spi->dev,
   576					"spi transfer error in irq handler");
   577				return IRQ_HANDLED;
   578			}
   579			for (i = 0; i < AD777X_NUM_CHANNELS; i++) {
   580				if (st->active_ch & BIT(i))
 > 581					tmp[k++] = __be32_to_cpu(st->spidata_rx[i]);
   582			}
   583			iio_push_to_buffers(indio_dev, &tmp[0]);
   584		}
   585	
   586		return IRQ_HANDLED;
   587	}
   588	
   589	static int ad777x_reset(struct iio_dev *indio_dev, struct gpio_desc *reset_gpio)
   590	{
   591		struct ad777x_state *st = iio_priv(indio_dev);
   592		int ret;
   593		struct spi_transfer reg_read_tr[] = {
   594			{
   595				.tx_buf = st->reset_buf,
   596				.len = 8,
   597			},
   598		};
   599	
   600		memset(st->reset_buf, 0xff, sizeof(st->reset_buf));
   601	
   602		if (reset_gpio) {
   603			gpiod_set_value(reset_gpio, 1);
   604			fsleep(230);
   605			return 0;
   606		}
   607	
   608		ret = spi_sync_transfer(st->spi, reg_read_tr,
   609					ARRAY_SIZE(reg_read_tr));
   610		if (ret)
   611			return ret;
   612	
   613		fsleep(230);
   614	
   615		return 0;
   616	}
   617	
   618	static const struct iio_info ad777x_info = {
   619		.read_raw = ad777x_read_raw,
   620		.write_raw = ad777x_write_raw,
   621		.debugfs_reg_access = &ad777x_reg_access,
   622		.update_scan_mode = &ad777x_update_scan_mode,
   623	};
   624	
   625	static const struct iio_enum ad777x_filter_enum = {
   626		.items = ad777x_filter_type,
   627		.num_items = ARRAY_SIZE(ad777x_filter_type),
   628		.get = ad777x_get_filter,
   629		.set = ad777x_set_filter,
   630	};
   631	
   632	static const struct iio_chan_spec_ext_info ad777x_ext_filter[] = {
   633		IIO_ENUM("filter_type", IIO_SHARED_BY_ALL, &ad777x_filter_enum),
   634		IIO_ENUM_AVAILABLE("filter_type", IIO_SHARED_BY_ALL,
   635					  &ad777x_filter_enum),
   636		{ }
   637	};
   638	
   639	#define AD777x_CHAN_S(index, _ext_info)					       \
   640		{								       \
   641			.type = IIO_VOLTAGE,					       \
   642			.info_mask_separate = BIT(IIO_CHAN_INFO_CALIBSCALE)  |	       \
   643					      BIT(IIO_CHAN_INFO_CALIBBIAS),	       \
   644			.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),       \
   645			.address = (index),					       \
   646			.indexed = 1,						       \
   647			.channel = (index),					       \
   648			.scan_index = (index),					       \
   649			.ext_info = (_ext_info),				       \
   650			.scan_type = {						       \
   651				.sign = 's',					       \
   652				.realbits = 24,					       \
   653				.storagebits = 32,				       \
   654			},							       \
   655		}
   656	
   657	#define AD777x_CHAN_NO_FILTER_S(index)					       \
   658		AD777x_CHAN_S(index, NULL)
   659	
   660	#define AD777x_CHAN_FILTER_S(index)					       \
   661		AD777x_CHAN_S(index, ad777x_ext_filter)
   662	
   663	static const struct iio_chan_spec ad777x_channels[] = {
   664		AD777x_CHAN_NO_FILTER_S(0),
   665		AD777x_CHAN_NO_FILTER_S(1),
   666		AD777x_CHAN_NO_FILTER_S(2),
   667		AD777x_CHAN_NO_FILTER_S(3),
   668		AD777x_CHAN_NO_FILTER_S(4),
   669		AD777x_CHAN_NO_FILTER_S(5),
   670		AD777x_CHAN_NO_FILTER_S(6),
   671		AD777x_CHAN_NO_FILTER_S(7),
   672	};
   673	
   674	static const struct iio_chan_spec ad777x_channels_filter[] = {
   675		AD777x_CHAN_FILTER_S(0),
   676		AD777x_CHAN_FILTER_S(1),
   677		AD777x_CHAN_FILTER_S(2),
   678		AD777x_CHAN_FILTER_S(3),
   679		AD777x_CHAN_FILTER_S(4),
   680		AD777x_CHAN_FILTER_S(5),
   681		AD777x_CHAN_FILTER_S(6),
   682		AD777x_CHAN_FILTER_S(7),
   683	};
   684	
 > 685	const struct iio_buffer_setup_ops ad777x_buffer_setup_ops = {
   686		.postenable = ad777x_buffer_postenable,
   687		.predisable = ad777x_buffer_predisable,
   688	};
   689	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-05-31  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 15:03 [PATCH v2] drivers: iio: adc: add support for ad777x family ranechita
2024-05-29 15:13 ` Andy Shevchenko
2024-05-29 15:33   ` Nechita, Ramona
2024-05-31  0:07 ` kernel test robot [this message]
2024-06-02 10:53 ` Jonathan Cameron
2024-06-19 12:36   ` Nechita, Ramona

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202405310747.6KO7w1V1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bigunclemax@gmail.com \
    --cc=broonie@kernel.org \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    --cc=mike.looijmans@topic.nl \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=okan.sahin@analog.com \
    --cc=ramona.nechita@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox