aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge/core/chnl_sm.c
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2012-02-06 18:39:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-09 12:38:19 -0500
commit40e6336d1bdc10f072b6563dfb1255b5c4b039a2 (patch)
treecc6aae8dfc2f8102771469247a0d55ead38178a3 /drivers/staging/tidspbridge/core/chnl_sm.c
parent276cc746d58b73aa4e046745441b8cf56858f9ef (diff)
staging: tidspbridge: remove DBC_ASSERT macro
This macro is only valid when CONFIG_TIDSPBRDIGE_DEBUG is enabled and it only prints a log message, it is not a real assertion mechanism like BUG_ON() or WARN_ON(). It is better to remove them: less code to maintain. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/tidspbridge/core/chnl_sm.c')
-rw-r--r--drivers/staging/tidspbridge/core/chnl_sm.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index 91daf25d29a..3136e8ddad4 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -123,7 +123,6 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *host_buf,
123 CHNL_IS_OUTPUT(pchnl->chnl_mode)) 123 CHNL_IS_OUTPUT(pchnl->chnl_mode))
124 return -EPIPE; 124 return -EPIPE;
125 /* No other possible states left */ 125 /* No other possible states left */
126 DBC_ASSERT(0);
127 } 126 }
128 127
129 dev_obj = dev_get_first(); 128 dev_obj = dev_get_first();
@@ -190,7 +189,6 @@ func_cont:
190 * Note: for dma chans dw_dsp_addr contains dsp address 189 * Note: for dma chans dw_dsp_addr contains dsp address
191 * of SM buffer. 190 * of SM buffer.
192 */ 191 */
193 DBC_ASSERT(chnl_mgr_obj->word_size != 0);
194 /* DSP address */ 192 /* DSP address */
195 chnl_packet_obj->dsp_tx_addr = dw_dsp_addr / chnl_mgr_obj->word_size; 193 chnl_packet_obj->dsp_tx_addr = dw_dsp_addr / chnl_mgr_obj->word_size;
196 chnl_packet_obj->byte_size = byte_size; 194 chnl_packet_obj->byte_size = byte_size;
@@ -201,7 +199,6 @@ func_cont:
201 CHNL_IOCSTATCOMPLETE); 199 CHNL_IOCSTATCOMPLETE);
202 list_add_tail(&chnl_packet_obj->link, &pchnl->io_requests); 200 list_add_tail(&chnl_packet_obj->link, &pchnl->io_requests);
203 pchnl->cio_reqs++; 201 pchnl->cio_reqs++;
204 DBC_ASSERT(pchnl->cio_reqs <= pchnl->chnl_packets);
205 /* 202 /*
206 * If end of stream, update the channel state to prevent 203 * If end of stream, update the channel state to prevent
207 * more IOR's. 204 * more IOR's.
@@ -209,8 +206,6 @@ func_cont:
209 if (is_eos) 206 if (is_eos)
210 pchnl->state |= CHNL_STATEEOS; 207 pchnl->state |= CHNL_STATEEOS;
211 208
212 /* Legacy DSM Processor-Copy */
213 DBC_ASSERT(pchnl->chnl_type == CHNL_PCPY);
214 /* Request IO from the DSP */ 209 /* Request IO from the DSP */
215 io_request_chnl(chnl_mgr_obj->iomgr, pchnl, 210 io_request_chnl(chnl_mgr_obj->iomgr, pchnl,
216 (CHNL_IS_INPUT(pchnl->chnl_mode) ? IO_INPUT : 211 (CHNL_IS_INPUT(pchnl->chnl_mode) ? IO_INPUT :
@@ -283,7 +278,6 @@ int bridge_chnl_cancel_io(struct chnl_object *chnl_obj)
283 list_add_tail(&chirp->link, &pchnl->io_completions); 278 list_add_tail(&chirp->link, &pchnl->io_completions);
284 pchnl->cio_cs++; 279 pchnl->cio_cs++;
285 pchnl->cio_reqs--; 280 pchnl->cio_reqs--;
286 DBC_ASSERT(pchnl->cio_reqs >= 0);
287 } 281 }
288 282
289 spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock); 283 spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock);
@@ -311,8 +305,6 @@ int bridge_chnl_close(struct chnl_object *chnl_obj)
311 status = bridge_chnl_cancel_io(chnl_obj); 305 status = bridge_chnl_cancel_io(chnl_obj);
312 if (status) 306 if (status)
313 return status; 307 return status;
314 /* Assert I/O on this channel is now cancelled: Protects from io_dpc */
315 DBC_ASSERT((pchnl->state & CHNL_STATECANCEL));
316 /* Invalidate channel object: Protects from CHNL_GetIOCompletion() */ 308 /* Invalidate channel object: Protects from CHNL_GetIOCompletion() */
317 /* Free the slot in the channel manager: */ 309 /* Free the slot in the channel manager: */
318 pchnl->chnl_mgr_obj->channels[pchnl->chnl_id] = NULL; 310 pchnl->chnl_mgr_obj->channels[pchnl->chnl_id] = NULL;
@@ -367,7 +359,6 @@ int bridge_chnl_create(struct chnl_mgr **channel_mgr,
367 * mgr_attrts->max_channels = CHNL_MAXCHANNELS = 359 * mgr_attrts->max_channels = CHNL_MAXCHANNELS =
368 * DDMA_MAXDDMACHNLS = DDMA_MAXZCPYCHNLS. 360 * DDMA_MAXDDMACHNLS = DDMA_MAXZCPYCHNLS.
369 */ 361 */
370 DBC_ASSERT(mgr_attrts->max_channels == CHNL_MAXCHANNELS);
371 max_channels = CHNL_MAXCHANNELS + CHNL_MAXCHANNELS * CHNL_PCPY; 362 max_channels = CHNL_MAXCHANNELS + CHNL_MAXCHANNELS * CHNL_PCPY;
372 /* Create array of channels */ 363 /* Create array of channels */
373 chnl_mgr_obj->channels = kzalloc(sizeof(struct chnl_object *) 364 chnl_mgr_obj->channels = kzalloc(sizeof(struct chnl_object *)
@@ -584,7 +575,6 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,
584 omap_mbox_disable_irq(dev_ctxt->mbox, IRQ_RX); 575 omap_mbox_disable_irq(dev_ctxt->mbox, IRQ_RX);
585 if (dequeue_ioc) { 576 if (dequeue_ioc) {
586 /* Dequeue IOC and set chan_ioc; */ 577 /* Dequeue IOC and set chan_ioc; */
587 DBC_ASSERT(!list_empty(&pchnl->io_completions));
588 chnl_packet_obj = list_first_entry(&pchnl->io_completions, 578 chnl_packet_obj = list_first_entry(&pchnl->io_completions,
589 struct chnl_irp, link); 579 struct chnl_irp, link);
590 list_del(&chnl_packet_obj->link); 580 list_del(&chnl_packet_obj->link);
@@ -748,7 +738,6 @@ int bridge_chnl_open(struct chnl_object **chnl,
748 return status; 738 return status;
749 } 739 }
750 740
751 DBC_ASSERT(ch_id < chnl_mgr_obj->max_channels);
752 741
753 /* Create channel object: */ 742 /* Create channel object: */
754 pchnl = kzalloc(sizeof(struct chnl_object), GFP_KERNEL); 743 pchnl = kzalloc(sizeof(struct chnl_object), GFP_KERNEL);
@@ -837,7 +826,6 @@ int bridge_chnl_register_notify(struct chnl_object *chnl_obj,
837{ 826{
838 int status = 0; 827 int status = 0;
839 828
840 DBC_ASSERT(!(event_mask & ~(DSP_STREAMDONE | DSP_STREAMIOCOMPLETION)));
841 829
842 if (event_mask) 830 if (event_mask)
843 status = ntfy_register(chnl_obj->ntfy_obj, hnotification, 831 status = ntfy_register(chnl_obj->ntfy_obj, hnotification,