Hi Oleksandr,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on sound/for-next] [also build test ERROR on v4.17-rc1 next-20180416] [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/Oleksandr-Andrushchenko/ALSA-xen-fr... base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from sound/xen/xen_snd_front.c:21:0:
sound/xen/xen_snd_front_evtchnl.h:62:34: error: field 'hw_param' has incomplete type
struct xensnd_query_hw_param hw_param; ^~~~~~~~ -- sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: undefined identifier 'XENSND_OP_TRIGGER' sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: undefined identifier 'XENSND_OP_HW_PARAM_QUERY' sound/xen/xen_snd_front_evtchnl.c:58:45: sparse: no member 'resp' in struct xensnd_resp sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: incompatible types for 'case' statement sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: incompatible types for 'case' statement sound/xen/xen_snd_front_evtchnl.c:99:20: sparse: using member 'in_prod' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:102:25: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:105:25: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:108:26: sparse: undefined identifier 'XENSND_IN_RING_REF' sound/xen/xen_snd_front_evtchnl.c:109:21: sparse: using member 'id' in incomplete struct xensnd_evt sound/xen/xen_snd_front_evtchnl.c:112:30: sparse: using member 'type' in incomplete struct xensnd_evt sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: undefined identifier 'XENSND_EVT_CUR_POS' sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: incompatible types for 'case' statement sound/xen/xen_snd_front_evtchnl.c:119:13: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:213:34: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:412:47: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:432:47: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: Expected constant expression in case statement sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: Expected constant expression in case statement sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: Expected constant expression in case statement In file included from sound/xen/xen_snd_front_evtchnl.c:18:0:
sound/xen/xen_snd_front_evtchnl.h:62:34: error: field 'hw_param' has incomplete type
struct xensnd_query_hw_param hw_param; ^~~~~~~~ sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_interrupt_req':
sound/xen/xen_snd_front_evtchnl.c:51:8: error: 'XENSND_OP_TRIGGER' undeclared (first use in this function); did you mean 'XENSND_OP_WRITE'?
case XENSND_OP_TRIGGER: ^~~~~~~~~~~~~~~~~ XENSND_OP_WRITE sound/xen/xen_snd_front_evtchnl.c:51:8: note: each undeclared identifier is reported only once for each function it appears in
sound/xen/xen_snd_front_evtchnl.c:55:8: error: 'XENSND_OP_HW_PARAM_QUERY' undeclared (first use in this function); did you mean 'XENSND_OP_TRIGGER'?
case XENSND_OP_HW_PARAM_QUERY: ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER
sound/xen/xen_snd_front_evtchnl.c:58:10: error: 'struct xensnd_resp' has no member named 'resp'
resp->resp.hw_param; ^~ sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_interrupt_evt':
sound/xen/xen_snd_front_evtchnl.c:99:13: error: dereferencing pointer to incomplete type 'struct xensnd_event_page'
prod = page->in_prod; ^~
sound/xen/xen_snd_front_evtchnl.c:108:12: error: implicit declaration of function 'XENSND_IN_RING_REF'; did you mean 'XENSND_FIELD_RING_REF'? [-Werror=implicit-function-declaration]
event = &XENSND_IN_RING_REF(page, cons); ^~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF
sound/xen/xen_snd_front_evtchnl.c:108:11: error: lvalue required as unary '&' operand
event = &XENSND_IN_RING_REF(page, cons); ^ In file included from include/linux/kernel.h:10:0, from include/linux/interrupt.h:6, from include/xen/events.h:5, from sound/xen/xen_snd_front_evtchnl.c:11:
sound/xen/xen_snd_front_evtchnl.c:109:21: error: dereferencing pointer to incomplete type 'struct xensnd_evt'
if (unlikely(event->id != channel->evt_id++)) ^ include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^
sound/xen/xen_snd_front_evtchnl.c:113:8: error: 'XENSND_EVT_CUR_POS' undeclared (first use in this function); did you mean 'XENSND_OP_CLOSE'?
case XENSND_EVT_CUR_POS: ^~~~~~~~~~~~~~~~~~ XENSND_OP_CLOSE sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_alloc':
sound/xen/xen_snd_front_evtchnl.c:213:6: error: 'XENSND_FIELD_EVT_RING_REF' undeclared (first use in this function); did you mean 'XENSND_FIELD_RING_REF'?
XENSND_FIELD_EVT_RING_REF); ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF sound/xen/xen_snd_front_evtchnl.c: In function 'xen_snd_front_evtchnl_publish_all': sound/xen/xen_snd_front_evtchnl.c:412:12: error: 'XENSND_FIELD_EVT_RING_REF' undeclared (first use in this function); did you mean 'XENSND_FIELD_RING_REF'? XENSND_FIELD_EVT_RING_REF, ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF
sound/xen/xen_snd_front_evtchnl.c:413:12: error: 'XENSND_FIELD_EVT_EVT_CHNL' undeclared (first use in this function); did you mean 'XENSND_FIELD_EVT_CHNL'?
XENSND_FIELD_EVT_EVT_CHNL); ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_EVT_CHNL cc1: some warnings being treated as errors
sparse warnings: (new ones prefixed by >>)
sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: undefined identifier 'XENSND_OP_TRIGGER' sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: undefined identifier 'XENSND_OP_HW_PARAM_QUERY' sound/xen/xen_snd_front_evtchnl.c:58:45: sparse: no member 'resp' in struct xensnd_resp
sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: incompatible types for 'case' statement
sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: incompatible types for 'case' statement sound/xen/xen_snd_front_evtchnl.c:99:20: sparse: using member 'in_prod' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:102:25: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:105:25: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:108:26: sparse: undefined identifier 'XENSND_IN_RING_REF' sound/xen/xen_snd_front_evtchnl.c:109:21: sparse: using member 'id' in incomplete struct xensnd_evt sound/xen/xen_snd_front_evtchnl.c:112:30: sparse: using member 'type' in incomplete struct xensnd_evt sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: undefined identifier 'XENSND_EVT_CUR_POS' sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: incompatible types for 'case' statement sound/xen/xen_snd_front_evtchnl.c:119:13: sparse: using member 'in_cons' in incomplete struct xensnd_event_page sound/xen/xen_snd_front_evtchnl.c:213:34: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:412:47: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:432:47: sparse: undefined identifier 'XENSND_FIELD_EVT_RING_REF' sound/xen/xen_snd_front_evtchnl.c:51:22: sparse: Expected constant expression in case statement sound/xen/xen_snd_front_evtchnl.c:55:22: sparse: Expected constant expression in case statement sound/xen/xen_snd_front_evtchnl.c:113:22: sparse: Expected constant expression in case statement In file included from sound/xen/xen_snd_front_evtchnl.c:18:0: sound/xen/xen_snd_front_evtchnl.h:62:34: error: field 'hw_param' has incomplete type struct xensnd_query_hw_param hw_param; ^~~~~~~~ sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_interrupt_req': sound/xen/xen_snd_front_evtchnl.c:51:8: error: 'XENSND_OP_TRIGGER' undeclared (first use in this function); did you mean 'XENSND_OP_WRITE'? case XENSND_OP_TRIGGER: ^~~~~~~~~~~~~~~~~ XENSND_OP_WRITE sound/xen/xen_snd_front_evtchnl.c:51:8: note: each undeclared identifier is reported only once for each function it appears in sound/xen/xen_snd_front_evtchnl.c:55:8: error: 'XENSND_OP_HW_PARAM_QUERY' undeclared (first use in this function); did you mean 'XENSND_OP_TRIGGER'? case XENSND_OP_HW_PARAM_QUERY: ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER sound/xen/xen_snd_front_evtchnl.c:58:10: error: 'struct xensnd_resp' has no member named 'resp' resp->resp.hw_param; ^~ sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_interrupt_evt': sound/xen/xen_snd_front_evtchnl.c:99:13: error: dereferencing pointer to incomplete type 'struct xensnd_event_page' prod = page->in_prod; ^~ sound/xen/xen_snd_front_evtchnl.c:108:12: error: implicit declaration of function 'XENSND_IN_RING_REF'; did you mean 'XENSND_FIELD_RING_REF'? [-Werror=implicit-function-declaration] event = &XENSND_IN_RING_REF(page, cons); ^~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF sound/xen/xen_snd_front_evtchnl.c:108:11: error: lvalue required as unary '&' operand event = &XENSND_IN_RING_REF(page, cons); ^ In file included from include/linux/kernel.h:10:0, from include/linux/interrupt.h:6, from include/xen/events.h:5, from sound/xen/xen_snd_front_evtchnl.c:11: sound/xen/xen_snd_front_evtchnl.c:109:21: error: dereferencing pointer to incomplete type 'struct xensnd_evt' if (unlikely(event->id != channel->evt_id++)) ^ include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ sound/xen/xen_snd_front_evtchnl.c:113:8: error: 'XENSND_EVT_CUR_POS' undeclared (first use in this function); did you mean 'XENSND_OP_CLOSE'? case XENSND_EVT_CUR_POS: ^~~~~~~~~~~~~~~~~~ XENSND_OP_CLOSE sound/xen/xen_snd_front_evtchnl.c: In function 'evtchnl_alloc': sound/xen/xen_snd_front_evtchnl.c:213:6: error: 'XENSND_FIELD_EVT_RING_REF' undeclared (first use in this function); did you mean 'XENSND_FIELD_RING_REF'? XENSND_FIELD_EVT_RING_REF); ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF sound/xen/xen_snd_front_evtchnl.c: In function 'xen_snd_front_evtchnl_publish_all': sound/xen/xen_snd_front_evtchnl.c:412:12: error: 'XENSND_FIELD_EVT_RING_REF' undeclared (first use in this function); did you mean 'XENSND_FIELD_RING_REF'? XENSND_FIELD_EVT_RING_REF, ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_RING_REF sound/xen/xen_snd_front_evtchnl.c:413:12: error: 'XENSND_FIELD_EVT_EVT_CHNL' undeclared (first use in this function); did you mean 'XENSND_FIELD_EVT_CHNL'? XENSND_FIELD_EVT_EVT_CHNL); ^~~~~~~~~~~~~~~~~~~~~~~~~ XENSND_FIELD_EVT_CHNL cc1: some warnings being treated as errors
vim +/hw_param +62 sound/xen/xen_snd_front_evtchnl.h
39 40 struct xen_snd_front_evtchnl { 41 struct xen_snd_front_info *front_info; 42 int gref; 43 int port; 44 int irq; 45 int index; 46 /* state of the event channel */ 47 enum xen_snd_front_evtchnl_state state; 48 enum xen_snd_front_evtchnl_type type; 49 /* either response id or incoming event id */ 50 u16 evt_id; 51 /* next request id or next expected event id */ 52 u16 evt_next_id; 53 union { 54 struct { 55 struct xen_sndif_front_ring ring; 56 struct completion completion; 57 /* latest response status */ 58 int resp_status; 59 /* serializer for backend IO: request/response */ 60 struct mutex req_io_lock; 61 union {
62 struct xensnd_query_hw_param hw_param;
63 } resp; 64 } req; 65 struct { 66 struct xensnd_event_page *page; 67 /* this is needed to handle XENSND_EVT_CUR_POS event */ 68 struct snd_pcm_substream *substream; 69 } evt; 70 } u; 71 }; 72
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation