* [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
@ 2025-02-10 16:16 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-10 16:16 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: oe-kbuild-all, Mark Brown, Charles Keepax
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-10 16:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 16:16 [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 kernel test robot
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.