From: kernel test robot <lkp@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev, Mark Brown <broonie@kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: [broonie-ci:20250205_ckeepax_add_sdca_disco_parsing_support 30/37] sound/soc/sdca/sdca_functions.c:233:36: sparse: sparse: cast to restricted __le32
Date: Tue, 11 Feb 2025 00:16:13 +0800 [thread overview]
Message-ID: <202502110032.OUxeAwlV-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git 20250205_ckeepax_add_sdca_disco_parsing_support
head: 9da195880f167ab7c2d595388decf783c9920121
commit: 19f6748abbab8523a7b32a5e371e39d4d8d4aba5 [30/37] ASoC: SDCA: Parse initialization write table
config: i386-randconfig-061-20250210 (https://download.01.org/0day-ci/archive/20250211/202502110032.OUxeAwlV-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502110032.OUxeAwlV-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/202502110032.OUxeAwlV-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> sound/soc/sdca/sdca_functions.c:233:36: sparse: sparse: cast to restricted __le32
vim +233 sound/soc/sdca/sdca_functions.c
188
189 static int find_sdca_init_table(struct device *dev,
190 struct fwnode_handle *function_node,
191 struct sdca_function_data *function)
192 {
193 struct sdca_init_write *init_write;
194 int write_size = sizeof(init_write->addr) + sizeof(init_write->val);
195 u8 *init_list, *init_iter;
196 int num_init_writes;
197
198 num_init_writes = fwnode_property_count_u8(function_node,
199 "mipi-sdca-function-initialization-table");
200 if (!num_init_writes || num_init_writes == -EINVAL) {
201 return 0;
202 } else if (num_init_writes < 0) {
203 dev_err(dev, "%pfwP: failed to read initialization table: %d\n",
204 function_node, num_init_writes);
205 return num_init_writes;
206 } else if (num_init_writes % write_size != 0) {
207 dev_err(dev, "%pfwP: init table size invalid\n", function_node);
208 return -EINVAL;
209 } else if (num_init_writes > SDCA_MAX_INIT_COUNT) {
210 dev_err(dev, "%pfwP: maximum init table size exceeded\n", function_node);
211 return -EINVAL;
212 }
213
214 init_write = devm_kcalloc(dev, num_init_writes / write_size,
215 sizeof(*init_write), GFP_KERNEL);
216 if (!init_write)
217 return -ENOMEM;
218
219 init_list = kcalloc(num_init_writes, sizeof(*init_list), GFP_KERNEL);
220 if (!init_list)
221 return -ENOMEM;
222
223 fwnode_property_read_u8_array(function_node,
224 "mipi-sdca-function-initialization-table",
225 init_list, num_init_writes);
226
227 function->num_init_table = num_init_writes;
228 function->init_table = init_write;
229
230 for (init_iter = init_list; init_iter < init_list + num_init_writes;) {
231 u32 *addr = (u32 *)init_iter;
232
> 233 init_write->addr = le32_to_cpu(*addr);
234 init_iter += sizeof(init_write->addr);
235
236 init_write->val = *init_iter;
237 init_iter += sizeof(init_write->val);
238 }
239
240 kfree(init_list);
241
242 return 0;
243 }
244
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-10 16:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502110032.OUxeAwlV-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pierre-louis.bossart@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.