Re: [PATCH 1/4] ALSA: usb-audio: Initial Power Domain support
From: kbuild test robot
Date: Thu Jul 19 2018 - 13:11:08 EST
Hi Jorge,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sound/for-next]
[also build test ERROR on v4.18-rc5 next-20180719]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jorge-Sanjuan/usb-audio-Add-UAC3-Power-Domains/20180719-212009
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
sound//usb/power.c: In function 'snd_usb_find_power_domain':
sound//usb/power.c:36:7: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
^~~~~~~
d_alloc
sound//usb/power.c:36:5: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
^
>> sound//usb/power.c:59:2: error: implicit declaration of function 'kfree'; did you mean 'irq_free'? [-Werror=implicit-function-declaration]
kfree(pd);
^~~~~
irq_free
cc1: some warnings being treated as errors
vim +59 sound//usb/power.c
28
29 struct snd_usb_power_domain *
30 snd_usb_find_power_domain(struct usb_host_interface *ctrl_iface,
31 unsigned char id)
32 {
33 struct snd_usb_power_domain *pd;
34 void *p;
35
> 36 pd = kzalloc(sizeof(*pd), GFP_KERNEL);
37 if (!pd)
38 return NULL;
39
40 p = NULL;
41 while ((p = snd_usb_find_csint_desc(ctrl_iface->extra,
42 ctrl_iface->extralen,
43 p, UAC3_POWER_DOMAIN)) != NULL) {
44 struct uac3_power_domain_descriptor *pd_desc = p;
45 int i;
46
47 for (i = 0; i < pd_desc->bNrEntities; i++) {
48 if (pd_desc->baEntityID[i] == id) {
49 pd->pd_id = pd_desc->bPowerDomainID;
50 pd->pd_d1d0_rec =
51 le16_to_cpu(pd_desc->waRecoveryTime1);
52 pd->pd_d2d0_rec =
53 le16_to_cpu(pd_desc->waRecoveryTime2);
54 return pd;
55 }
56 }
57 }
58
> 59 kfree(pd);
60 return NULL;
61 }
62
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip