From: kernel test robot <lkp@intel.com>
To: Kim Seer Paller <kimseer.paller@analog.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [linux-next:master 2315/3762] drivers/iio/adc/max14001.c:81:29: sparse: sparse: incorrect type in initializer (different base types)
Date: Fri, 21 Jul 2023 00:12:30 +0800 [thread overview]
Message-ID: <202307210041.jT6femhS-lkp@intel.com> (raw)
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
next reply other threads:[~2023-07-20 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 16:12 kernel test robot [this message]
2023-07-20 16:30 ` Andy Shevchenko
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=202307210041.jT6femhS-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=kimseer.paller@analog.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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