[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 5/5] ALSA: xen-front: Implement ALSA virtual sound driver
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-front-Add-Xen-para-virtualized-frontend-driver/20180416-143123 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 >>): sound/xen/xen_snd_front.c:70:46: sparse: undefined identifier 'XENSND_OP_HW_PARAM_QUERY' sound/xen/xen_snd_front.c:71:16: sparse: no member 'hw_param' in union <unnamed> sound/xen/xen_snd_front.c:105:21: sparse: no member 'period_sz' in struct xensnd_open_req sound/xen/xen_snd_front.c:201:46: sparse: undefined identifier 'XENSND_OP_TRIGGER' sound/xen/xen_snd_front.c:202:16: sparse: no member 'trigger' in union <unnamed> sound/xen/xen_snd_front.c:70:36: sparse: call with no type! sound/xen/xen_snd_front.c:71:16: sparse: generating address of non-lvalue (8) sound/xen/xen_snd_front.c:105:21: sparse: generating address of non-lvalue (8) sound/xen/xen_snd_front.c:201:36: sparse: call with no type! In file included from sound/xen/xen_snd_front.c:23: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.c: In function 'xen_snd_front_stream_query_hw_param': >> sound/xen/xen_snd_front.c:70:39: error: 'XENSND_OP_HW_PARAM_QUERY' >> undeclared (first use in this function); did you mean 'XENSND_OP_WRITE'? req = be_stream_prepare_req(evtchnl, XENSND_OP_HW_PARAM_QUERY); ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_WRITE sound/xen/xen_snd_front.c:70:39: note: each undeclared identifier is reported only once for each function it appears in >> sound/xen/xen_snd_front.c:71:9: error: 'union <anonymous>' has no member >> named 'hw_param' req->op.hw_param = *hw_param_req; ^ >> sound/xen/xen_snd_front.c:71:21: error: dereferencing pointer to incomplete >> type 'struct xensnd_query_hw_param' req->op.hw_param = *hw_param_req; ^~~~~~~~~~~~~ sound/xen/xen_snd_front.c: In function 'xen_snd_front_stream_prepare': >> sound/xen/xen_snd_front.c:105:14: error: 'struct xensnd_open_req' has no >> member named 'period_sz' req->op.open.period_sz = period_sz; ^ sound/xen/xen_snd_front.c: In function 'xen_snd_front_stream_trigger': >> sound/xen/xen_snd_front.c:201:39: error: 'XENSND_OP_TRIGGER' undeclared >> (first use in this function); did you mean 'XENSND_OP_WRITE'? req = be_stream_prepare_req(evtchnl, XENSND_OP_TRIGGER); ^~~~~~~~~~~~~~~~~ XENSND_OP_WRITE >> sound/xen/xen_snd_front.c:202:9: error: 'union <anonymous>' has no member >> named 'trigger' req->op.trigger.type = type; ^ -- sound/xen/xen_snd_front_alsa.c:191:47: sparse: restricted snd_pcm_format_t degrades to integer sound/xen/xen_snd_front_alsa.c:205:59: sparse: restricted snd_pcm_format_t degrades to integer sound/xen/xen_snd_front_alsa.c:266:12: sparse: using member 'formats' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:269:12: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:270:12: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:272:12: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:273:12: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:275:12: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:276:12: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:278:12: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:279:12: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:293:50: sparse: using member 'formats' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:306:28: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:307:28: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:313:28: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:314:28: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:320:28: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:321:28: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:327:28: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:328:28: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:509:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_START' sound/xen/xen_snd_front_alsa.c:513:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_RESUME' sound/xen/xen_snd_front_alsa.c:517:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_STOP' sound/xen/xen_snd_front_alsa.c:521:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_PAUSE' sound/xen/xen_snd_front_alsa.c:266:44: sparse: call with no type! sound/xen/xen_snd_front_alsa.c:266:12: sparse: generating address of non-lvalue (8) sound/xen/xen_snd_front_alsa.c:269:30: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:270:30: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:272:36: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:273:36: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:275:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:276:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:278:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:279:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:293:45: sparse: call with no type! sound/xen/xen_snd_front_alsa.c:306:34: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:307:34: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:313:37: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:314:37: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:320:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:321:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:327:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:328:35: sparse: unknown expression (8 46) In file included from sound/xen/xen_snd_front_alsa.c:22: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_alsa.c: In function 'alsa_hw_rule': >> sound/xen/xen_snd_front_alsa.c:257:31: error: storage size of 'req' isn't >> known struct xensnd_query_hw_param req; ^~~ >> sound/xen/xen_snd_front_alsa.c:258:31: error: storage size of 'resp' isn't >> known struct xensnd_query_hw_param resp; ^~~~ sound/xen/xen_snd_front_alsa.c:258:31: warning: unused variable 'resp' [-Wunused-variable] sound/xen/xen_snd_front_alsa.c:257:31: warning: unused variable 'req' [-Wunused-variable] struct xensnd_query_hw_param req; ^~~ sound/xen/xen_snd_front_alsa.c: In function 'alsa_trigger': >> sound/xen/xen_snd_front_alsa.c:509:10: error: 'XENSND_OP_TRIGGER_START' >> undeclared (first use in this function); did you mean >> 'SNDRV_PCM_TRIGGER_START'? type = XENSND_OP_TRIGGER_START; ^~~~~~~~~~~~~~~~~~~~~~~ SNDRV_PCM_TRIGGER_START sound/xen/xen_snd_front_alsa.c:509:10: note: each undeclared identifier is reported only once for each function it appears in >> sound/xen/xen_snd_front_alsa.c:513:10: error: 'XENSND_OP_TRIGGER_RESUME' >> undeclared (first use in this function); did you mean >> 'XENSND_OP_TRIGGER_START'? type = XENSND_OP_TRIGGER_RESUME; ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_START >> sound/xen/xen_snd_front_alsa.c:517:10: error: 'XENSND_OP_TRIGGER_STOP' >> undeclared (first use in this function); did you mean >> 'XENSND_OP_TRIGGER_START'? type = XENSND_OP_TRIGGER_STOP; ^~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_START >> sound/xen/xen_snd_front_alsa.c:521:10: error: 'XENSND_OP_TRIGGER_PAUSE' >> undeclared (first use in this function); did you mean >> 'XENSND_OP_TRIGGER_RESUME'? type = XENSND_OP_TRIGGER_PAUSE; ^~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_RESUME sparse warnings: (new ones prefixed by >>) sound/xen/xen_snd_front.c:70:46: sparse: undefined identifier 'XENSND_OP_HW_PARAM_QUERY' sound/xen/xen_snd_front.c:71:16: sparse: no member 'hw_param' in union <unnamed> sound/xen/xen_snd_front.c:105:21: sparse: no member 'period_sz' in struct xensnd_open_req sound/xen/xen_snd_front.c:201:46: sparse: undefined identifier 'XENSND_OP_TRIGGER' sound/xen/xen_snd_front.c:202:16: sparse: no member 'trigger' in union <unnamed> >> sound/xen/xen_snd_front.c:70:36: sparse: call with no type! >> sound/xen/xen_snd_front.c:71:16: sparse: generating address of non-lvalue (8) sound/xen/xen_snd_front.c:105:21: sparse: generating address of non-lvalue (8) sound/xen/xen_snd_front.c:201:36: sparse: call with no type! In file included from sound/xen/xen_snd_front.c:23: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.c: In function 'xen_snd_front_stream_query_hw_param': sound/xen/xen_snd_front.c:70:39: error: 'XENSND_OP_HW_PARAM_QUERY' undeclared (first use in this function); did you mean 'XENSND_OP_WRITE'? req = be_stream_prepare_req(evtchnl, XENSND_OP_HW_PARAM_QUERY); ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_WRITE sound/xen/xen_snd_front.c:70:39: note: each undeclared identifier is reported only once for each function it appears in sound/xen/xen_snd_front.c:71:9: error: 'union <anonymous>' has no member named 'hw_param' req->op.hw_param = *hw_param_req; ^ sound/xen/xen_snd_front.c:71:21: error: dereferencing pointer to incomplete type 'struct xensnd_query_hw_param' req->op.hw_param = *hw_param_req; ^~~~~~~~~~~~~ sound/xen/xen_snd_front.c: In function 'xen_snd_front_stream_prepare': sound/xen/xen_snd_front.c:105:14: error: 'struct xensnd_open_req' has no member named 'period_sz' req->op.open.period_sz = period_sz; ^ sound/xen/xen_snd_front.c: In function 'xen_snd_front_stream_trigger': sound/xen/xen_snd_front.c:201:39: error: 'XENSND_OP_TRIGGER' undeclared (first use in this function); did you mean 'XENSND_OP_WRITE'? req = be_stream_prepare_req(evtchnl, XENSND_OP_TRIGGER); ^~~~~~~~~~~~~~~~~ XENSND_OP_WRITE sound/xen/xen_snd_front.c:202:9: error: 'union <anonymous>' has no member named 'trigger' req->op.trigger.type = type; ^ -- >> sound/xen/xen_snd_front_alsa.c:191:47: sparse: restricted snd_pcm_format_t >> degrades to integer sound/xen/xen_snd_front_alsa.c:205:59: sparse: restricted snd_pcm_format_t degrades to integer sound/xen/xen_snd_front_alsa.c:266:12: sparse: using member 'formats' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:269:12: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:270:12: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:272:12: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:273:12: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:275:12: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:276:12: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:278:12: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:279:12: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:293:50: sparse: using member 'formats' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:306:28: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:307:28: sparse: using member 'rates' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:313:28: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:314:28: sparse: using member 'channels' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:320:28: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:321:28: sparse: using member 'buffer' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:327:28: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:328:28: sparse: using member 'period' in incomplete struct xensnd_query_hw_param sound/xen/xen_snd_front_alsa.c:509:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_START' sound/xen/xen_snd_front_alsa.c:513:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_RESUME' sound/xen/xen_snd_front_alsa.c:517:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_STOP' sound/xen/xen_snd_front_alsa.c:521:24: sparse: undefined identifier 'XENSND_OP_TRIGGER_PAUSE' >> sound/xen/xen_snd_front_alsa.c:266:44: sparse: call with no type! >> sound/xen/xen_snd_front_alsa.c:266:12: sparse: generating address of >> non-lvalue (8) >> sound/xen/xen_snd_front_alsa.c:269:30: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:270:30: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:272:36: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:273:36: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:275:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:276:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:278:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:279:32: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:293:45: sparse: call with no type! sound/xen/xen_snd_front_alsa.c:306:34: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:307:34: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:313:37: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:314:37: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:320:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:321:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:327:35: sparse: unknown expression (8 46) sound/xen/xen_snd_front_alsa.c:328:35: sparse: unknown expression (8 46) In file included from sound/xen/xen_snd_front_alsa.c:22: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_alsa.c: In function 'alsa_hw_rule': sound/xen/xen_snd_front_alsa.c:257:31: error: storage size of 'req' isn't known struct xensnd_query_hw_param req; ^~~ sound/xen/xen_snd_front_alsa.c:258:31: error: storage size of 'resp' isn't known struct xensnd_query_hw_param resp; ^~~~ sound/xen/xen_snd_front_alsa.c:258:31: warning: unused variable 'resp' [-Wunused-variable] sound/xen/xen_snd_front_alsa.c:257:31: warning: unused variable 'req' [-Wunused-variable] struct xensnd_query_hw_param req; ^~~ sound/xen/xen_snd_front_alsa.c: In function 'alsa_trigger': sound/xen/xen_snd_front_alsa.c:509:10: error: 'XENSND_OP_TRIGGER_START' undeclared (first use in this function); did you mean 'SNDRV_PCM_TRIGGER_START'? type = XENSND_OP_TRIGGER_START; ^~~~~~~~~~~~~~~~~~~~~~~ SNDRV_PCM_TRIGGER_START sound/xen/xen_snd_front_alsa.c:509:10: note: each undeclared identifier is reported only once for each function it appears in sound/xen/xen_snd_front_alsa.c:513:10: error: 'XENSND_OP_TRIGGER_RESUME' undeclared (first use in this function); did you mean 'XENSND_OP_TRIGGER_START'? type = XENSND_OP_TRIGGER_RESUME; ^~~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_START sound/xen/xen_snd_front_alsa.c:517:10: error: 'XENSND_OP_TRIGGER_STOP' undeclared (first use in this function); did you mean 'XENSND_OP_TRIGGER_START'? type = XENSND_OP_TRIGGER_STOP; ^~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_START sound/xen/xen_snd_front_alsa.c:521:10: error: 'XENSND_OP_TRIGGER_PAUSE' undeclared (first use in this function); did you mean 'XENSND_OP_TRIGGER_RESUME'? type = XENSND_OP_TRIGGER_PAUSE; ^~~~~~~~~~~~~~~~~~~~~~~ XENSND_OP_TRIGGER_RESUME vim +70 sound/xen/xen_snd_front.c 57 58 int xen_snd_front_stream_query_hw_param(struct xen_snd_front_evtchnl *evtchnl, 59 struct xensnd_query_hw_param *hw_param_req, 60 struct xensnd_query_hw_param *hw_param_resp) 61 { 62 struct xen_snd_front_info *front_info = evtchnl->front_info; 63 struct xensnd_req *req; 64 unsigned long flags; 65 int ret; 66 67 mutex_lock(&evtchnl->u.req.req_io_lock); 68 69 spin_lock_irqsave(&front_info->io_lock, flags); > 70 req = be_stream_prepare_req(evtchnl, XENSND_OP_HW_PARAM_QUERY); > 71 req->op.hw_param = *hw_param_req; 72 73 ret = be_stream_do_io(evtchnl); 74 spin_unlock_irqrestore(&front_info->io_lock, flags); 75 76 if (ret == 0) 77 ret = be_stream_wait_io(evtchnl); 78 79 if (ret == 0) 80 *hw_param_resp = evtchnl->u.req.resp.hw_param; 81 82 mutex_unlock(&evtchnl->u.req.req_io_lock); 83 return ret; 84 } 85 86 int xen_snd_front_stream_prepare(struct xen_snd_front_evtchnl *evtchnl, 87 struct xen_snd_front_shbuf *sh_buf, 88 u8 format, unsigned int channels, 89 unsigned int rate, u32 buffer_sz, 90 u32 period_sz) 91 { 92 struct xen_snd_front_info *front_info = evtchnl->front_info; 93 struct xensnd_req *req; 94 unsigned long flags; 95 int ret; 96 97 mutex_lock(&evtchnl->u.req.req_io_lock); 98 99 spin_lock_irqsave(&front_info->io_lock, flags); 100 req = be_stream_prepare_req(evtchnl, XENSND_OP_OPEN); 101 req->op.open.pcm_format = format; 102 req->op.open.pcm_channels = channels; 103 req->op.open.pcm_rate = rate; 104 req->op.open.buffer_sz = buffer_sz; > 105 req->op.open.period_sz = period_sz; 106 req->op.open.gref_directory = xen_snd_front_shbuf_get_dir_start(sh_buf); 107 108 ret = be_stream_do_io(evtchnl); 109 spin_unlock_irqrestore(&front_info->io_lock, flags); 110 111 if (ret == 0) 112 ret = be_stream_wait_io(evtchnl); 113 114 mutex_unlock(&evtchnl->u.req.req_io_lock); 115 return ret; 116 } 117 118 int xen_snd_front_stream_close(struct xen_snd_front_evtchnl *evtchnl) 119 { 120 struct xen_snd_front_info *front_info = evtchnl->front_info; 121 struct xensnd_req *req; 122 unsigned long flags; 123 int ret; 124 125 mutex_lock(&evtchnl->u.req.req_io_lock); 126 127 spin_lock_irqsave(&front_info->io_lock, flags); 128 req = be_stream_prepare_req(evtchnl, XENSND_OP_CLOSE); 129 130 ret = be_stream_do_io(evtchnl); 131 spin_unlock_irqrestore(&front_info->io_lock, flags); 132 133 if (ret == 0) 134 ret = be_stream_wait_io(evtchnl); 135 136 mutex_unlock(&evtchnl->u.req.req_io_lock); 137 return ret; 138 } 139 140 int xen_snd_front_stream_write(struct xen_snd_front_evtchnl *evtchnl, 141 unsigned long pos, unsigned long count) 142 { 143 struct xen_snd_front_info *front_info = evtchnl->front_info; 144 struct xensnd_req *req; 145 unsigned long flags; 146 int ret; 147 148 mutex_lock(&evtchnl->u.req.req_io_lock); 149 150 spin_lock_irqsave(&front_info->io_lock, flags); 151 req = be_stream_prepare_req(evtchnl, XENSND_OP_WRITE); 152 req->op.rw.length = count; 153 req->op.rw.offset = pos; 154 155 ret = be_stream_do_io(evtchnl); 156 spin_unlock_irqrestore(&front_info->io_lock, flags); 157 158 if (ret == 0) 159 ret = be_stream_wait_io(evtchnl); 160 161 mutex_unlock(&evtchnl->u.req.req_io_lock); 162 return ret; 163 } 164 165 int xen_snd_front_stream_read(struct xen_snd_front_evtchnl *evtchnl, 166 unsigned long pos, unsigned long count) 167 { 168 struct xen_snd_front_info *front_info = evtchnl->front_info; 169 struct xensnd_req *req; 170 unsigned long flags; 171 int ret; 172 173 mutex_lock(&evtchnl->u.req.req_io_lock); 174 175 spin_lock_irqsave(&front_info->io_lock, flags); 176 req = be_stream_prepare_req(evtchnl, XENSND_OP_READ); 177 req->op.rw.length = count; 178 req->op.rw.offset = pos; 179 180 ret = be_stream_do_io(evtchnl); 181 spin_unlock_irqrestore(&front_info->io_lock, flags); 182 183 if (ret == 0) 184 ret = be_stream_wait_io(evtchnl); 185 186 mutex_unlock(&evtchnl->u.req.req_io_lock); 187 return ret; 188 } 189 190 int xen_snd_front_stream_trigger(struct xen_snd_front_evtchnl *evtchnl, 191 int type) 192 { 193 struct xen_snd_front_info *front_info = evtchnl->front_info; 194 struct xensnd_req *req; 195 unsigned long flags; 196 int ret; 197 198 mutex_lock(&evtchnl->u.req.req_io_lock); 199 200 spin_lock_irqsave(&front_info->io_lock, flags); > 201 req = be_stream_prepare_req(evtchnl, XENSND_OP_TRIGGER); > 202 req->op.trigger.type = type; 203 204 ret = be_stream_do_io(evtchnl); 205 spin_unlock_irqrestore(&front_info->io_lock, flags); 206 207 if (ret == 0) 208 ret = be_stream_wait_io(evtchnl); 209 210 mutex_unlock(&evtchnl->u.req.req_io_lock); 211 return ret; 212 } 213 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation Attachment:
.config.gz _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |