Hi Pavel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on linus/master v5.16-rc6 next-20211220]
[cannot apply to balbi-usb/testing/next peter-chen-usb/for-usb-next]
[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]
url:
https://github.com/0day-ci/linux/commits/Pavel-Hofman/usb-gadget-audio-Mu...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: riscv-randconfig-r003-20211220
(
https://download.01.org/0day-ci/archive/20211221/202112210422.0fC1uDBA-lk...)
compiler: riscv32-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/2b868f914e557058c0b5e749db604db56...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Pavel-Hofman/usb-gadget-audio-Multiple-rates-dyn-bInterval/20211220-162736
git checkout 2b868f914e557058c0b5e749db604db56b77e353
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=riscv SHELL=/bin/bash drivers/usb/gadget/legacy/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/usb/gadget/legacy/audio.c: In function 'audio_bind':
> drivers/usb/gadget/legacy/audio.c:287:25: error:
'p_srates_cnt' undeclared (first use in this function)
287 |
for (i = 0; i < p_srates_cnt; ++i)
| ^~~~~~~~~~~~
drivers/usb/gadget/legacy/audio.c:287:25: note: each undeclared identifier is reported
only once for each function it appears in
> drivers/usb/gadget/legacy/audio.c:288:42: error:
'p_srates' undeclared (first use in this function); did you mean
'p_srate'?
288 | uac1_opts->p_srates[i] =
p_srates[i];
| ^~~~~~~~
| p_srate
> drivers/usb/gadget/legacy/audio.c:294:25: error:
'c_srates_cnt' undeclared (first use in this function)
294 |
for (i = 0; i < c_srates_cnt; ++i)
| ^~~~~~~~~~~~
> drivers/usb/gadget/legacy/audio.c:295:42: error:
'c_srates' undeclared (first use in this function); did you mean
'c_srate'?
295 | uac1_opts->c_srates[i] =
c_srates[i];
| ^~~~~~~~
| c_srate
vim +/p_srates_cnt +287 drivers/usb/gadget/legacy/audio.c
264
265 #ifndef CONFIG_GADGET_UAC1
266 uac2_opts = container_of(fi_uac2, struct f_uac2_opts, func_inst);
267 uac2_opts->p_chmask = p_chmask;
268
269 for (i = 0; i < p_srates_cnt; ++i)
270 uac2_opts->p_srates[i] = p_srates[i];
271 uac2_opts->p_srate = p_srates[0];
272
273 uac2_opts->p_ssize = p_ssize;
274 uac2_opts->c_chmask = c_chmask;
275
276 for (i = 0; i < c_srates_cnt; ++i)
277 uac2_opts->c_srates[i] = c_srates[i];
278 uac2_opts->c_srate = c_srates[0];
279
280 uac2_opts->c_ssize = c_ssize;
281 uac2_opts->req_number = UAC2_DEF_REQ_NUM;
282 #else
283 #ifndef CONFIG_GADGET_UAC1_LEGACY
284 uac1_opts = container_of(fi_uac1, struct f_uac1_opts, func_inst);
285 uac1_opts->p_chmask = p_chmask;
286
287 for (i = 0; i < p_srates_cnt; ++i)
288 uac1_opts->p_srates[i] = p_srates[i];
289 uac1_opts->p_srate =
p_srates[0];
290
291 uac1_opts->p_ssize = p_ssize;
292 uac1_opts->c_chmask = c_chmask;
293
294 for (i = 0; i < c_srates_cnt; ++i)
295 uac1_opts->c_srates[i] = c_srates[i];
296 uac1_opts->c_srate =
c_srates[0];
297
298 uac1_opts->c_ssize = c_ssize;
299 uac1_opts->req_number = UAC1_DEF_REQ_NUM;
300 #else /* CONFIG_GADGET_UAC1_LEGACY */
301 uac1_opts = container_of(fi_uac1, struct f_uac1_legacy_opts, func_inst);
302 uac1_opts->fn_play = fn_play;
303 uac1_opts->fn_cap = fn_cap;
304 uac1_opts->fn_cntl = fn_cntl;
305 uac1_opts->req_buf_size = req_buf_size;
306 uac1_opts->req_count = req_count;
307 uac1_opts->audio_buf_size = audio_buf_size;
308 #endif /* CONFIG_GADGET_UAC1_LEGACY */
309 #endif
310
311 status = usb_string_ids_tab(cdev, strings_dev);
312 if (status < 0)
313 goto fail;
314 device_desc.iManufacturer = strings_dev[USB_GADGET_MANUFACTURER_IDX].id;
315 device_desc.iProduct = strings_dev[USB_GADGET_PRODUCT_IDX].id;
316
317 if (gadget_is_otg(cdev->gadget) && !otg_desc[0]) {
318 struct usb_descriptor_header *usb_desc;
319
320 usb_desc = usb_otg_descriptor_alloc(cdev->gadget);
321 if (!usb_desc) {
322 status = -ENOMEM;
323 goto fail;
324 }
325 usb_otg_descriptor_init(cdev->gadget, usb_desc);
326 otg_desc[0] = usb_desc;
327 otg_desc[1] = NULL;
328 }
329
330 status = usb_add_config(cdev, &audio_config_driver, audio_do_config);
331 if (status < 0)
332 goto fail_otg_desc;
333 usb_composite_overwrite_options(cdev, &coverwrite);
334
335 INFO(cdev, "%s, version: %s\n", DRIVER_DESC, DRIVER_VERSION);
336 return 0;
337
338 fail_otg_desc:
339 kfree(otg_desc[0]);
340 otg_desc[0] = NULL;
341 fail:
342 #ifndef CONFIG_GADGET_UAC1
343 usb_put_function_instance(fi_uac2);
344 #else
345 usb_put_function_instance(fi_uac1);
346 #endif
347 return status;
348 }
349
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org