linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 2315/3762] drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types)
@ 2023-07-20 16:12 kernel test robot
  2023-07-20 16:30 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-07-20 16:12 UTC (permalink / raw)
  To: Kim Seer Paller
  Cc: oe-kbuild-all, Linux Memory Management List, Jonathan Cameron,
	Andy Shevchenko

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c58c49dd89324b18a812762a2bfa5a0458e4f252
commit: ba2c3e63b681b624e0158775620ee2f89cc7e266 [2315/3762] iio: adc: max14001: New driver
config: arc-randconfig-r093-20230720 (https://download.01.org/0day-ci/archive/20230721/202307210041.jT6femhS-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210041.jT6femhS-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/202307210041.jT6femhS-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned short [usertype] __x @@     got restricted __be16 [usertype] @@
   drivers/iio/adc/max14001.c:81:29: sparse:     expected unsigned short [usertype] __x
   drivers/iio/adc/max14001.c:81:29: sparse:     got restricted __be16 [usertype]
>> drivers/iio/adc/max14001.c:81:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] spi_tx_buffer @@     got int @@
   drivers/iio/adc/max14001.c:81:27: sparse:     expected restricted __be16 [usertype] spi_tx_buffer
   drivers/iio/adc/max14001.c:81:27: sparse:     got int
   drivers/iio/adc/max14001.c:97:29: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned short [usertype] __x @@     got restricted __be16 [usertype] @@
   drivers/iio/adc/max14001.c:97:29: sparse:     expected unsigned short [usertype] __x
   drivers/iio/adc/max14001.c:97:29: sparse:     got restricted __be16 [usertype]
   drivers/iio/adc/max14001.c:97:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] spi_tx_buffer @@     got int @@
   drivers/iio/adc/max14001.c:97:27: sparse:     expected restricted __be16 [usertype] spi_tx_buffer
   drivers/iio/adc/max14001.c:97:27: sparse:     got int

vim +81 drivers/iio/adc/max14001.c

    64	
    65	static int max14001_read(void *context, unsigned int reg_addr, unsigned int *data)
    66	{
    67		struct max14001_state *st = context;
    68		int ret;
    69	
    70		struct spi_transfer xfers[] = {
    71			{
    72				.tx_buf = &st->spi_tx_buffer,
    73				.len = sizeof(st->spi_tx_buffer),
    74				.cs_change = 1,
    75			}, {
    76				.rx_buf = &st->spi_rx_buffer,
    77				.len = sizeof(st->spi_rx_buffer),
    78			},
    79		};
    80	
  > 81		st->spi_tx_buffer = bitrev16(cpu_to_be16(FIELD_PREP(MAX14001_ADDR_MASK,
    82									reg_addr)));
    83	
    84		ret = spi_sync_transfer(st->spi, xfers, ARRAY_SIZE(xfers));
    85		if (ret)
    86			return ret;
    87	
    88		*data = bitrev16(be16_to_cpu(st->spi_rx_buffer)) & MAX14001_DATA_MASK;
    89	
    90		return 0;
    91	}
    92	

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 2315/3762] drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types)
  2023-07-20 16:12 [linux-next:master 2315/3762] drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
@ 2023-07-20 16:30 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2023-07-20 16:30 UTC (permalink / raw)
  To: kernel test robot
  Cc: Kim Seer Paller, oe-kbuild-all, Linux Memory Management List,
	Jonathan Cameron

On Thu, Jul 20, 2023 at 7:14 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   c58c49dd89324b18a812762a2bfa5a0458e4f252
> commit: ba2c3e63b681b624e0158775620ee2f89cc7e266 [2315/3762] iio: adc: max14001: New driver
> config: arc-randconfig-r093-20230720 (https://download.01.org/0day-ci/archive/20230721/202307210041.jT6femhS-lkp@intel.com/config)
> compiler: arc-elf-gcc (GCC) 12.3.0
> reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210041.jT6femhS-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/202307210041.jT6femhS-lkp@intel.com/

Exactly why I asked to elaborate on the algorithm documentation and
hence developing proper driver updates to fix this issue in
particular.


-- 
With Best Regards,
Andy Shevchenko


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-20 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 16:12 [linux-next:master 2315/3762] drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
2023-07-20 16:30 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox