diff options
Diffstat (limited to 'drivers/staging/tidspbridge/rmgr')
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/dbdcd.c | 6 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/disp.c | 3 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/drv.c | 7 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/drv_interface.c | 2 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/mgr.c | 2 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/nldr.c | 22 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/node.c | 11 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/proc.c | 15 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/rmm.c | 3 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/strm.c | 11 |
10 files changed, 0 insertions, 82 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c index 792b44363fd..18109fc346a 100644 --- a/drivers/staging/tidspbridge/rmgr/dbdcd.c +++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c | |||
@@ -206,7 +206,6 @@ int dcd_enumerate_object(s32 index, enum dsp_dcdobjtype obj_type, | |||
206 | * "_\0" + length of sz_obj_type string + terminating NULL. | 206 | * "_\0" + length of sz_obj_type string + terminating NULL. |
207 | */ | 207 | */ |
208 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; | 208 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; |
209 | DBC_ASSERT(dw_key_len < DCD_MAXPATHLENGTH); | ||
210 | 209 | ||
211 | /* Create proper REG key; concatenate DCD_REGKEY with | 210 | /* Create proper REG key; concatenate DCD_REGKEY with |
212 | * obj_type. */ | 211 | * obj_type. */ |
@@ -375,7 +374,6 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr, | |||
375 | /* Pre-determine final key length. It's length of DCD_REGKEY + | 374 | /* Pre-determine final key length. It's length of DCD_REGKEY + |
376 | * "_\0" + length of sz_obj_type string + terminating NULL */ | 375 | * "_\0" + length of sz_obj_type string + terminating NULL */ |
377 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; | 376 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; |
378 | DBC_ASSERT(dw_key_len < DCD_MAXPATHLENGTH); | ||
379 | 377 | ||
380 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ | 378 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ |
381 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); | 379 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); |
@@ -434,7 +432,6 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr, | |||
434 | } | 432 | } |
435 | 433 | ||
436 | /* Ensure sz_uuid + 1 is not greater than sizeof sz_sect_name. */ | 434 | /* Ensure sz_uuid + 1 is not greater than sizeof sz_sect_name. */ |
437 | DBC_ASSERT((strlen(sz_uuid) + 1) < sizeof(sz_sect_name)); | ||
438 | 435 | ||
439 | /* Create section name based on node UUID. A period is | 436 | /* Create section name based on node UUID. A period is |
440 | * pre-pended to the UUID string to form the section name. | 437 | * pre-pended to the UUID string to form the section name. |
@@ -635,7 +632,6 @@ int dcd_get_library_name(struct dcd_manager *hdcd_mgr, | |||
635 | * "_\0" + length of sz_obj_type string + terminating NULL. | 632 | * "_\0" + length of sz_obj_type string + terminating NULL. |
636 | */ | 633 | */ |
637 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; | 634 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; |
638 | DBC_ASSERT(dw_key_len < DCD_MAXPATHLENGTH); | ||
639 | 635 | ||
640 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ | 636 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ |
641 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); | 637 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); |
@@ -663,7 +659,6 @@ int dcd_get_library_name(struct dcd_manager *hdcd_mgr, | |||
663 | break; | 659 | break; |
664 | default: | 660 | default: |
665 | status = -EINVAL; | 661 | status = -EINVAL; |
666 | DBC_ASSERT(false); | ||
667 | } | 662 | } |
668 | if (!status) { | 663 | if (!status) { |
669 | if ((strlen(sz_reg_key) + strlen(sz_obj_type)) < | 664 | if ((strlen(sz_reg_key) + strlen(sz_obj_type)) < |
@@ -794,7 +789,6 @@ int dcd_register_object(struct dsp_uuid *uuid_obj, | |||
794 | * "_\0" + length of sz_obj_type string + terminating NULL. | 789 | * "_\0" + length of sz_obj_type string + terminating NULL. |
795 | */ | 790 | */ |
796 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; | 791 | dw_key_len = strlen(DCD_REGKEY) + 1 + sizeof(sz_obj_type) + 1; |
797 | DBC_ASSERT(dw_key_len < DCD_MAXPATHLENGTH); | ||
798 | 792 | ||
799 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ | 793 | /* Create proper REG key; concatenate DCD_REGKEY with obj_type. */ |
800 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); | 794 | strncpy(sz_reg_key, DCD_REGKEY, strlen(DCD_REGKEY) + 1); |
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c index 04c88a7d019..63fdf1ee910 100644 --- a/drivers/staging/tidspbridge/rmgr/disp.c +++ b/drivers/staging/tidspbridge/rmgr/disp.c | |||
@@ -268,7 +268,6 @@ int disp_node_create(struct disp_object *disp_obj, | |||
268 | node_type = node_get_type(hnode); | 268 | node_type = node_get_type(hnode); |
269 | node_msg_args = pargs->asa.node_msg_args; | 269 | node_msg_args = pargs->asa.node_msg_args; |
270 | max = disp_obj->bufsize_rms; /*Max # of RMS words that can be sent */ | 270 | max = disp_obj->bufsize_rms; /*Max # of RMS words that can be sent */ |
271 | DBC_ASSERT(max == RMS_COMMANDBUFSIZE); | ||
272 | chars_in_rms_word = sizeof(rms_word) / disp_obj->char_size; | 271 | chars_in_rms_word = sizeof(rms_word) / disp_obj->char_size; |
273 | /* Number of RMS words needed to hold arg data */ | 272 | /* Number of RMS words needed to hold arg data */ |
274 | dw_length = | 273 | dw_length = |
@@ -429,7 +428,6 @@ int disp_node_create(struct disp_object *disp_obj, | |||
429 | } | 428 | } |
430 | if (!status) { | 429 | if (!status) { |
431 | ul_bytes = total * sizeof(rms_word); | 430 | ul_bytes = total * sizeof(rms_word); |
432 | DBC_ASSERT(ul_bytes < (RMS_COMMANDBUFSIZE * sizeof(rms_word))); | ||
433 | status = send_message(disp_obj, node_get_timeout(hnode), | 431 | status = send_message(disp_obj, node_get_timeout(hnode), |
434 | ul_bytes, node_env); | 432 | ul_bytes, node_env); |
435 | } | 433 | } |
@@ -665,7 +663,6 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, | |||
665 | status = -EPERM; | 663 | status = -EPERM; |
666 | } else { | 664 | } else { |
667 | if (CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) { | 665 | if (CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) { |
668 | DBC_ASSERT(chnl_ioc_obj.buf == pbuf); | ||
669 | if (*((int *)chnl_ioc_obj.buf) < 0) { | 666 | if (*((int *)chnl_ioc_obj.buf) < 0) { |
670 | /* Translate DSP's to kernel error */ | 667 | /* Translate DSP's to kernel error */ |
671 | status = -EREMOTEIO; | 668 | status = -EREMOTEIO; |
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c index f3bff1bfcc6..cd93c128570 100644 --- a/drivers/staging/tidspbridge/rmgr/drv.c +++ b/drivers/staging/tidspbridge/rmgr/drv.c | |||
@@ -172,7 +172,6 @@ void drv_proc_node_update_status(void *node_resource, s32 status) | |||
172 | { | 172 | { |
173 | struct node_res_object *node_res_obj = | 173 | struct node_res_object *node_res_obj = |
174 | (struct node_res_object *)node_resource; | 174 | (struct node_res_object *)node_resource; |
175 | DBC_ASSERT(node_resource != NULL); | ||
176 | node_res_obj->node_allocated = status; | 175 | node_res_obj->node_allocated = status; |
177 | } | 176 | } |
178 | 177 | ||
@@ -181,7 +180,6 @@ void drv_proc_node_update_heap_status(void *node_resource, s32 status) | |||
181 | { | 180 | { |
182 | struct node_res_object *node_res_obj = | 181 | struct node_res_object *node_res_obj = |
183 | (struct node_res_object *)node_resource; | 182 | (struct node_res_object *)node_resource; |
184 | DBC_ASSERT(node_resource != NULL); | ||
185 | node_res_obj->heap_allocated = status; | 183 | node_res_obj->heap_allocated = status; |
186 | } | 184 | } |
187 | 185 | ||
@@ -378,13 +376,8 @@ int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj, | |||
378 | struct dev_object **device_obj) | 376 | struct dev_object **device_obj) |
379 | { | 377 | { |
380 | int status = 0; | 378 | int status = 0; |
381 | #ifdef CONFIG_TIDSPBRIDGE_DEBUG | ||
382 | /* used only for Assertions and debug messages */ | ||
383 | struct drv_object *pdrv_obj = (struct drv_object *)hdrv_obj; | ||
384 | #endif | ||
385 | struct dev_object *dev_obj; | 379 | struct dev_object *dev_obj; |
386 | u32 i; | 380 | u32 i; |
387 | DBC_ASSERT(!(list_empty(&pdrv_obj->dev_list))); | ||
388 | 381 | ||
389 | dev_obj = (struct dev_object *)drv_get_first_dev_object(); | 382 | dev_obj = (struct dev_object *)drv_get_first_dev_object(); |
390 | for (i = 0; i < index; i++) { | 383 | for (i = 0; i < index; i++) { |
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c index 34730de45aa..f0f07efe4f8 100644 --- a/drivers/staging/tidspbridge/rmgr/drv_interface.c +++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c | |||
@@ -255,8 +255,6 @@ static int bridge_mmap(struct file *filp, struct vm_area_struct *vma) | |||
255 | { | 255 | { |
256 | u32 status; | 256 | u32 status; |
257 | 257 | ||
258 | DBC_ASSERT(vma->vm_start < vma->vm_end); | ||
259 | |||
260 | vma->vm_flags |= VM_RESERVED | VM_IO; | 258 | vma->vm_flags |= VM_RESERVED | VM_IO; |
261 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 259 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
262 | 260 | ||
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c index 1dca953e4d6..b0ce0bc9c81 100644 --- a/drivers/staging/tidspbridge/rmgr/mgr.c +++ b/drivers/staging/tidspbridge/rmgr/mgr.c | |||
@@ -141,7 +141,6 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props, | |||
141 | } | 141 | } |
142 | pmgr_obj = drv_datap->mgr_object; | 142 | pmgr_obj = drv_datap->mgr_object; |
143 | 143 | ||
144 | DBC_ASSERT(pmgr_obj); | ||
145 | /* Forever loop till we hit failed or no more items in the | 144 | /* Forever loop till we hit failed or no more items in the |
146 | * Enumeration. We will exit the loop other than 0; */ | 145 | * Enumeration. We will exit the loop other than 0; */ |
147 | while (!status) { | 146 | while (!status) { |
@@ -225,7 +224,6 @@ int mgr_enum_processor_info(u32 processor_id, | |||
225 | dev_dbg(bridge, "%s: Failed to get MGR Object\n", __func__); | 224 | dev_dbg(bridge, "%s: Failed to get MGR Object\n", __func__); |
226 | goto func_end; | 225 | goto func_end; |
227 | } | 226 | } |
228 | DBC_ASSERT(pmgr_obj); | ||
229 | /* Forever loop till we hit no more items in the | 227 | /* Forever loop till we hit no more items in the |
230 | * Enumeration. We will exit the loop other than 0; */ | 228 | * Enumeration. We will exit the loop other than 0; */ |
231 | while (status1 == 0) { | 229 | while (status1 == 0) { |
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c index 6fb19ef68a8..cc20dd9bcbe 100644 --- a/drivers/staging/tidspbridge/rmgr/nldr.c +++ b/drivers/staging/tidspbridge/rmgr/nldr.c | |||
@@ -427,13 +427,10 @@ int nldr_create(struct nldr_object **nldr, | |||
427 | dev_get_cod_mgr(hdev_obj, &cod_mgr); | 427 | dev_get_cod_mgr(hdev_obj, &cod_mgr); |
428 | if (cod_mgr) { | 428 | if (cod_mgr) { |
429 | status = cod_get_loader(cod_mgr, &nldr_obj->dbll); | 429 | status = cod_get_loader(cod_mgr, &nldr_obj->dbll); |
430 | DBC_ASSERT(!status); | ||
431 | status = cod_get_base_lib(cod_mgr, &nldr_obj->base_lib); | 430 | status = cod_get_base_lib(cod_mgr, &nldr_obj->base_lib); |
432 | DBC_ASSERT(!status); | ||
433 | status = | 431 | status = |
434 | cod_get_base_name(cod_mgr, sz_zl_file, | 432 | cod_get_base_name(cod_mgr, sz_zl_file, |
435 | COD_MAXPATHLENGTH); | 433 | COD_MAXPATHLENGTH); |
436 | DBC_ASSERT(!status); | ||
437 | } | 434 | } |
438 | status = 0; | 435 | status = 0; |
439 | /* end lazy status checking */ | 436 | /* end lazy status checking */ |
@@ -534,7 +531,6 @@ int nldr_create(struct nldr_object **nldr, | |||
534 | status = | 531 | status = |
535 | cod_get_base_name(cod_mgr, sz_zl_file, COD_MAXPATHLENGTH); | 532 | cod_get_base_name(cod_mgr, sz_zl_file, COD_MAXPATHLENGTH); |
536 | /* lazy check */ | 533 | /* lazy check */ |
537 | DBC_ASSERT(!status); | ||
538 | /* First count number of overlay nodes */ | 534 | /* First count number of overlay nodes */ |
539 | status = | 535 | status = |
540 | dcd_get_objects(nldr_obj->dcd_mgr, sz_zl_file, | 536 | dcd_get_objects(nldr_obj->dcd_mgr, sz_zl_file, |
@@ -666,7 +662,6 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, | |||
666 | root = nldr_node_obj->delete_lib; | 662 | root = nldr_node_obj->delete_lib; |
667 | break; | 663 | break; |
668 | default: | 664 | default: |
669 | DBC_ASSERT(false); | ||
670 | break; | 665 | break; |
671 | } | 666 | } |
672 | } else { | 667 | } else { |
@@ -806,7 +801,6 @@ int nldr_load(struct nldr_nodeobject *nldr_node_obj, | |||
806 | break; | 801 | break; |
807 | 802 | ||
808 | default: | 803 | default: |
809 | DBC_ASSERT(false); | ||
810 | break; | 804 | break; |
811 | } | 805 | } |
812 | } | 806 | } |
@@ -853,7 +847,6 @@ int nldr_unload(struct nldr_nodeobject *nldr_node_obj, | |||
853 | nldr_node_obj->pers_libs = 0; | 847 | nldr_node_obj->pers_libs = 0; |
854 | break; | 848 | break; |
855 | default: | 849 | default: |
856 | DBC_ASSERT(false); | ||
857 | break; | 850 | break; |
858 | } | 851 | } |
859 | } else { | 852 | } else { |
@@ -1090,7 +1083,6 @@ static void free_sects(struct nldr_object *nldr_obj, | |||
1090 | ret = | 1083 | ret = |
1091 | rmm_free(nldr_obj->rmm, 0, ovly_section->sect_run_addr, | 1084 | rmm_free(nldr_obj->rmm, 0, ovly_section->sect_run_addr, |
1092 | ovly_section->size, true); | 1085 | ovly_section->size, true); |
1093 | DBC_ASSERT(ret); | ||
1094 | ovly_section = ovly_section->next_sect; | 1086 | ovly_section = ovly_section->next_sect; |
1095 | i++; | 1087 | i++; |
1096 | } | 1088 | } |
@@ -1210,7 +1202,6 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, | |||
1210 | 1202 | ||
1211 | if (depth > MAXDEPTH) { | 1203 | if (depth > MAXDEPTH) { |
1212 | /* Error */ | 1204 | /* Error */ |
1213 | DBC_ASSERT(false); | ||
1214 | } | 1205 | } |
1215 | root->lib = NULL; | 1206 | root->lib = NULL; |
1216 | /* Allocate a buffer for library file name of size DBL_MAXPATHLENGTH */ | 1207 | /* Allocate a buffer for library file name of size DBL_MAXPATHLENGTH */ |
@@ -1273,7 +1264,6 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, | |||
1273 | dcd_get_num_dep_libs(nldr_node_obj->nldr_obj->dcd_mgr, | 1264 | dcd_get_num_dep_libs(nldr_node_obj->nldr_obj->dcd_mgr, |
1274 | &uuid, &nd_libs, &np_libs, phase); | 1265 | &uuid, &nd_libs, &np_libs, phase); |
1275 | } | 1266 | } |
1276 | DBC_ASSERT(nd_libs >= np_libs); | ||
1277 | if (!status) { | 1267 | if (!status) { |
1278 | if (!(*nldr_node_obj->phase_split)) | 1268 | if (!(*nldr_node_obj->phase_split)) |
1279 | np_libs = 0; | 1269 | np_libs = 0; |
@@ -1435,7 +1425,6 @@ static int load_ovly(struct nldr_nodeobject *nldr_node_obj, | |||
1435 | } | 1425 | } |
1436 | } | 1426 | } |
1437 | 1427 | ||
1438 | DBC_ASSERT(i < nldr_obj->ovly_nodes); | ||
1439 | 1428 | ||
1440 | if (!po_node) { | 1429 | if (!po_node) { |
1441 | status = -ENOENT; | 1430 | status = -ENOENT; |
@@ -1461,7 +1450,6 @@ static int load_ovly(struct nldr_nodeobject *nldr_node_obj, | |||
1461 | break; | 1450 | break; |
1462 | 1451 | ||
1463 | default: | 1452 | default: |
1464 | DBC_ASSERT(false); | ||
1465 | break; | 1453 | break; |
1466 | } | 1454 | } |
1467 | 1455 | ||
@@ -1609,7 +1597,6 @@ static int remote_alloc(void **ref, u16 mem_sect, u32 size, | |||
1609 | mem_phase_bit = EXECUTEDATAFLAGBIT; | 1597 | mem_phase_bit = EXECUTEDATAFLAGBIT; |
1610 | break; | 1598 | break; |
1611 | default: | 1599 | default: |
1612 | DBC_ASSERT(false); | ||
1613 | break; | 1600 | break; |
1614 | } | 1601 | } |
1615 | if (mem_sect == DBLL_CODE) | 1602 | if (mem_sect == DBLL_CODE) |
@@ -1628,11 +1615,9 @@ static int remote_alloc(void **ref, u16 mem_sect, u32 size, | |||
1628 | /* Find an appropriate segment based on mem_sect */ | 1615 | /* Find an appropriate segment based on mem_sect */ |
1629 | if (segid == NULLID) { | 1616 | if (segid == NULLID) { |
1630 | /* No memory requirements of preferences */ | 1617 | /* No memory requirements of preferences */ |
1631 | DBC_ASSERT(!mem_load_req); | ||
1632 | goto func_cont; | 1618 | goto func_cont; |
1633 | } | 1619 | } |
1634 | if (segid <= MAXSEGID) { | 1620 | if (segid <= MAXSEGID) { |
1635 | DBC_ASSERT(segid < nldr_obj->dload_segs); | ||
1636 | /* Attempt to allocate from segid first. */ | 1621 | /* Attempt to allocate from segid first. */ |
1637 | rmm_addr_obj->segid = segid; | 1622 | rmm_addr_obj->segid = segid; |
1638 | status = | 1623 | status = |
@@ -1643,7 +1628,6 @@ static int remote_alloc(void **ref, u16 mem_sect, u32 size, | |||
1643 | } | 1628 | } |
1644 | } else { | 1629 | } else { |
1645 | /* segid > MAXSEGID ==> Internal or external memory */ | 1630 | /* segid > MAXSEGID ==> Internal or external memory */ |
1646 | DBC_ASSERT(segid == MEMINTERNALID || segid == MEMEXTERNALID); | ||
1647 | /* Check for any internal or external memory segment, | 1631 | /* Check for any internal or external memory segment, |
1648 | * depending on segid. */ | 1632 | * depending on segid. */ |
1649 | mem_sect_type |= segid == MEMINTERNALID ? | 1633 | mem_sect_type |= segid == MEMINTERNALID ? |
@@ -1717,7 +1701,6 @@ static void unload_lib(struct nldr_nodeobject *nldr_node_obj, | |||
1717 | struct nldr_object *nldr_obj = nldr_node_obj->nldr_obj; | 1701 | struct nldr_object *nldr_obj = nldr_node_obj->nldr_obj; |
1718 | u16 i; | 1702 | u16 i; |
1719 | 1703 | ||
1720 | DBC_ASSERT(root != NULL); | ||
1721 | 1704 | ||
1722 | /* Unload dependent libraries */ | 1705 | /* Unload dependent libraries */ |
1723 | for (i = 0; i < root->dep_libs; i++) | 1706 | for (i = 0; i < root->dep_libs; i++) |
@@ -1768,7 +1751,6 @@ static void unload_ovly(struct nldr_nodeobject *nldr_node_obj, | |||
1768 | } | 1751 | } |
1769 | } | 1752 | } |
1770 | 1753 | ||
1771 | DBC_ASSERT(i < nldr_obj->ovly_nodes); | ||
1772 | 1754 | ||
1773 | if (!po_node) | 1755 | if (!po_node) |
1774 | /* TODO: Should we print warning here? */ | 1756 | /* TODO: Should we print warning here? */ |
@@ -1795,14 +1777,11 @@ static void unload_ovly(struct nldr_nodeobject *nldr_node_obj, | |||
1795 | other_alloc = po_node->other_sects; | 1777 | other_alloc = po_node->other_sects; |
1796 | break; | 1778 | break; |
1797 | default: | 1779 | default: |
1798 | DBC_ASSERT(false); | ||
1799 | break; | 1780 | break; |
1800 | } | 1781 | } |
1801 | DBC_ASSERT(ref_count && (*ref_count > 0)); | ||
1802 | if (ref_count && (*ref_count > 0)) { | 1782 | if (ref_count && (*ref_count > 0)) { |
1803 | *ref_count -= 1; | 1783 | *ref_count -= 1; |
1804 | if (other_ref) { | 1784 | if (other_ref) { |
1805 | DBC_ASSERT(*other_ref > 0); | ||
1806 | *other_ref -= 1; | 1785 | *other_ref -= 1; |
1807 | } | 1786 | } |
1808 | } | 1787 | } |
@@ -1868,7 +1847,6 @@ int nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr, | |||
1868 | root = nldr_node->delete_lib; | 1847 | root = nldr_node->delete_lib; |
1869 | break; | 1848 | break; |
1870 | default: | 1849 | default: |
1871 | DBC_ASSERT(false); | ||
1872 | break; | 1850 | break; |
1873 | } | 1851 | } |
1874 | } else { | 1852 | } else { |
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c index d23d1d07d67..83b053f6be8 100644 --- a/drivers/staging/tidspbridge/rmgr/node.c +++ b/drivers/staging/tidspbridge/rmgr/node.c | |||
@@ -703,7 +703,6 @@ DBAPI node_alloc_msg_buf(struct node_object *hnode, u32 usize, | |||
703 | 703 | ||
704 | status = proc_get_processor_id(pnode->processor, &proc_id); | 704 | status = proc_get_processor_id(pnode->processor, &proc_id); |
705 | if (proc_id != DSP_UNIT) { | 705 | if (proc_id != DSP_UNIT) { |
706 | DBC_ASSERT(NULL); | ||
707 | goto func_end; | 706 | goto func_end; |
708 | } | 707 | } |
709 | /* If segment ID includes MEM_SETVIRTUALSEGID then pbuffer is a | 708 | /* If segment ID includes MEM_SETVIRTUALSEGID then pbuffer is a |
@@ -889,7 +888,6 @@ int node_connect(struct node_object *node1, u32 stream1, | |||
889 | if (node1_type != NODE_GPP) { | 888 | if (node1_type != NODE_GPP) { |
890 | hnode_mgr = node1->node_mgr; | 889 | hnode_mgr = node1->node_mgr; |
891 | } else { | 890 | } else { |
892 | DBC_ASSERT(node2 != (struct node_object *)DSP_HGPPNODE); | ||
893 | hnode_mgr = node2->node_mgr; | 891 | hnode_mgr = node2->node_mgr; |
894 | } | 892 | } |
895 | 893 | ||
@@ -968,9 +966,6 @@ int node_connect(struct node_object *node1, u32 stream1, | |||
968 | goto out_unlock; | 966 | goto out_unlock; |
969 | } | 967 | } |
970 | 968 | ||
971 | DBC_ASSERT((node1_type == NODE_GPP) || | ||
972 | (node2_type == NODE_GPP)); | ||
973 | |||
974 | chnl_mode = (node1_type == NODE_GPP) ? | 969 | chnl_mode = (node1_type == NODE_GPP) ? |
975 | CHNL_MODETODSP : CHNL_MODEFROMDSP; | 970 | CHNL_MODETODSP : CHNL_MODEFROMDSP; |
976 | 971 | ||
@@ -1617,7 +1612,6 @@ int node_free_msg_buf(struct node_object *hnode, u8 * pbuffer, | |||
1617 | status = cmm_xlator_free_buf(pnode->xlator, pbuffer); | 1612 | status = cmm_xlator_free_buf(pnode->xlator, pbuffer); |
1618 | } | 1613 | } |
1619 | } else { | 1614 | } else { |
1620 | DBC_ASSERT(NULL); /* BUG */ | ||
1621 | } | 1615 | } |
1622 | func_end: | 1616 | func_end: |
1623 | return status; | 1617 | return status; |
@@ -1692,7 +1686,6 @@ int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index, | |||
1692 | } | 1686 | } |
1693 | } | 1687 | } |
1694 | } else { | 1688 | } else { |
1695 | DBC_ASSERT(dir == DSP_FROMNODE); | ||
1696 | if (index < MAX_OUTPUTS(hnode)) { | 1689 | if (index < MAX_OUTPUTS(hnode)) { |
1697 | if (hnode->outputs[index].type == HOSTCONNECT) { | 1690 | if (hnode->outputs[index].type == HOSTCONNECT) { |
1698 | *chan_id = hnode->outputs[index].dev_id; | 1691 | *chan_id = hnode->outputs[index].dev_id; |
@@ -2222,7 +2215,6 @@ int node_run(struct node_object *hnode) | |||
2222 | NODE_GET_PRIORITY(hnode)); | 2215 | NODE_GET_PRIORITY(hnode)); |
2223 | } else { | 2216 | } else { |
2224 | /* We should never get here */ | 2217 | /* We should never get here */ |
2225 | DBC_ASSERT(false); | ||
2226 | } | 2218 | } |
2227 | func_cont1: | 2219 | func_cont1: |
2228 | /* Update node state. */ | 2220 | /* Update node state. */ |
@@ -2600,7 +2592,6 @@ static void fill_stream_connect(struct node_object *node1, | |||
2600 | strm1->connect_type = CONNECTTYPE_GPPOUTPUT; | 2592 | strm1->connect_type = CONNECTTYPE_GPPOUTPUT; |
2601 | } else { | 2593 | } else { |
2602 | /* GPP == > NODE */ | 2594 | /* GPP == > NODE */ |
2603 | DBC_ASSERT(node2 != (struct node_object *)DSP_HGPPNODE); | ||
2604 | strm_index = node2->num_inputs + node2->num_outputs - 1; | 2595 | strm_index = node2->num_inputs + node2->num_outputs - 1; |
2605 | strm2 = &(node2->stream_connect[strm_index]); | 2596 | strm2 = &(node2->stream_connect[strm_index]); |
2606 | strm2->cb_struct = sizeof(struct dsp_streamconnect); | 2597 | strm2->cb_struct = sizeof(struct dsp_streamconnect); |
@@ -2696,7 +2687,6 @@ static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr, | |||
2696 | break; | 2687 | break; |
2697 | default: | 2688 | default: |
2698 | /* Should never get here */ | 2689 | /* Should never get here */ |
2699 | DBC_ASSERT(false); | ||
2700 | break; | 2690 | break; |
2701 | } | 2691 | } |
2702 | 2692 | ||
@@ -2775,7 +2765,6 @@ static int get_node_props(struct dcd_manager *hdcd_mgr, | |||
2775 | } else { | 2765 | } else { |
2776 | /* Copy device name */ | 2766 | /* Copy device name */ |
2777 | len = strlen(pndb_props->ac_name); | 2767 | len = strlen(pndb_props->ac_name); |
2778 | DBC_ASSERT(len < MAXDEVNAMELEN); | ||
2779 | hnode->str_dev_name = kzalloc(len + 1, GFP_KERNEL); | 2768 | hnode->str_dev_name = kzalloc(len + 1, GFP_KERNEL); |
2780 | if (hnode->str_dev_name == NULL) { | 2769 | if (hnode->str_dev_name == NULL) { |
2781 | status = -ENOMEM; | 2770 | status = -ENOMEM; |
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c index 4e2f2e450b2..8da5db6fe07 100644 --- a/drivers/staging/tidspbridge/rmgr/proc.c +++ b/drivers/staging/tidspbridge/rmgr/proc.c | |||
@@ -1152,8 +1152,6 @@ int proc_load(void *hprocessor, const s32 argc_index, | |||
1152 | if (status) { | 1152 | if (status) { |
1153 | status = -EPERM; | 1153 | status = -EPERM; |
1154 | } else { | 1154 | } else { |
1155 | DBC_ASSERT(p_proc_object->last_coff == | ||
1156 | NULL); | ||
1157 | /* Allocate memory for pszLastCoff */ | 1155 | /* Allocate memory for pszLastCoff */ |
1158 | p_proc_object->last_coff = | 1156 | p_proc_object->last_coff = |
1159 | kzalloc((strlen(user_args[0]) + | 1157 | kzalloc((strlen(user_args[0]) + |
@@ -1176,7 +1174,6 @@ int proc_load(void *hprocessor, const s32 argc_index, | |||
1176 | if (!hmsg_mgr) { | 1174 | if (!hmsg_mgr) { |
1177 | status = msg_create(&hmsg_mgr, p_proc_object->dev_obj, | 1175 | status = msg_create(&hmsg_mgr, p_proc_object->dev_obj, |
1178 | (msg_onexit) node_on_exit); | 1176 | (msg_onexit) node_on_exit); |
1179 | DBC_ASSERT(!status); | ||
1180 | dev_set_msg_mgr(p_proc_object->dev_obj, hmsg_mgr); | 1177 | dev_set_msg_mgr(p_proc_object->dev_obj, hmsg_mgr); |
1181 | } | 1178 | } |
1182 | } | 1179 | } |
@@ -1272,7 +1269,6 @@ int proc_load(void *hprocessor, const s32 argc_index, | |||
1272 | strlen(pargv0) + 1); | 1269 | strlen(pargv0) + 1); |
1273 | else | 1270 | else |
1274 | status = -ENOMEM; | 1271 | status = -ENOMEM; |
1275 | DBC_ASSERT(brd_state == BRD_LOADED); | ||
1276 | } | 1272 | } |
1277 | } | 1273 | } |
1278 | 1274 | ||
@@ -1559,7 +1555,6 @@ func_cont: | |||
1559 | if (!((*p_proc_object->intf_fxns->brd_status) | 1555 | if (!((*p_proc_object->intf_fxns->brd_status) |
1560 | (p_proc_object->bridge_context, &brd_state))) { | 1556 | (p_proc_object->bridge_context, &brd_state))) { |
1561 | pr_info("%s: dsp in running state\n", __func__); | 1557 | pr_info("%s: dsp in running state\n", __func__); |
1562 | DBC_ASSERT(brd_state != BRD_HIBERNATION); | ||
1563 | } | 1558 | } |
1564 | } else { | 1559 | } else { |
1565 | pr_err("%s: Failed to start the dsp\n", __func__); | 1560 | pr_err("%s: Failed to start the dsp\n", __func__); |
@@ -1585,7 +1580,6 @@ int proc_stop(void *hprocessor) | |||
1585 | u32 node_tab_size = 1; | 1580 | u32 node_tab_size = 1; |
1586 | u32 num_nodes = 0; | 1581 | u32 num_nodes = 0; |
1587 | u32 nodes_allocated = 0; | 1582 | u32 nodes_allocated = 0; |
1588 | int brd_state; | ||
1589 | 1583 | ||
1590 | if (!p_proc_object) { | 1584 | if (!p_proc_object) { |
1591 | status = -EFAULT; | 1585 | status = -EFAULT; |
@@ -1618,11 +1612,6 @@ int proc_stop(void *hprocessor) | |||
1618 | msg_delete(hmsg_mgr); | 1612 | msg_delete(hmsg_mgr); |
1619 | dev_set_msg_mgr(p_proc_object->dev_obj, NULL); | 1613 | dev_set_msg_mgr(p_proc_object->dev_obj, NULL); |
1620 | } | 1614 | } |
1621 | if (!((*p_proc_object-> | ||
1622 | intf_fxns->brd_status) (p_proc_object-> | ||
1623 | bridge_context, | ||
1624 | &brd_state))) | ||
1625 | DBC_ASSERT(brd_state == BRD_STOPPED); | ||
1626 | } | 1615 | } |
1627 | } else { | 1616 | } else { |
1628 | pr_err("%s: Failed to stop the processor\n", __func__); | 1617 | pr_err("%s: Failed to stop the processor\n", __func__); |
@@ -1760,7 +1749,6 @@ static int proc_monitor(struct proc_object *proc_obj) | |||
1760 | { | 1749 | { |
1761 | int status = -EPERM; | 1750 | int status = -EPERM; |
1762 | struct msg_mgr *hmsg_mgr; | 1751 | struct msg_mgr *hmsg_mgr; |
1763 | int brd_state; | ||
1764 | 1752 | ||
1765 | /* This is needed only when Device is loaded when it is | 1753 | /* This is needed only when Device is loaded when it is |
1766 | * already 'ACTIVE' */ | 1754 | * already 'ACTIVE' */ |
@@ -1777,9 +1765,6 @@ static int proc_monitor(struct proc_object *proc_obj) | |||
1777 | if (!((*proc_obj->intf_fxns->brd_monitor) | 1765 | if (!((*proc_obj->intf_fxns->brd_monitor) |
1778 | (proc_obj->bridge_context))) { | 1766 | (proc_obj->bridge_context))) { |
1779 | status = 0; | 1767 | status = 0; |
1780 | if (!((*proc_obj->intf_fxns->brd_status) | ||
1781 | (proc_obj->bridge_context, &brd_state))) | ||
1782 | DBC_ASSERT(brd_state == BRD_IDLE); | ||
1783 | } | 1768 | } |
1784 | 1769 | ||
1785 | return status; | 1770 | return status; |
diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c index 6b410499c3b..fe13a7444ae 100644 --- a/drivers/staging/tidspbridge/rmgr/rmm.c +++ b/drivers/staging/tidspbridge/rmgr/rmm.c | |||
@@ -292,7 +292,6 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size, | |||
292 | list_for_each_entry_safe(sect, tmp, &target->ovly_list, | 292 | list_for_each_entry_safe(sect, tmp, &target->ovly_list, |
293 | list_elem) { | 293 | list_elem) { |
294 | if (dsp_addr == sect->addr) { | 294 | if (dsp_addr == sect->addr) { |
295 | DBC_ASSERT(size == sect->size); | ||
296 | /* Remove from list */ | 295 | /* Remove from list */ |
297 | list_del(§->list_elem); | 296 | list_del(§->list_elem); |
298 | kfree(sect); | 297 | kfree(sect); |
@@ -325,8 +324,6 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid, | |||
325 | u32 total_free_size = 0; | 324 | u32 total_free_size = 0; |
326 | u32 free_blocks = 0; | 325 | u32 free_blocks = 0; |
327 | 326 | ||
328 | DBC_ASSERT(target != NULL); | ||
329 | |||
330 | if ((u32) segid < target->num_segs) { | 327 | if ((u32) segid < target->num_segs) { |
331 | head = target->free_list[segid]; | 328 | head = target->free_list[segid]; |
332 | 329 | ||
diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c index 8e2d6493344..80d01e5b053 100644 --- a/drivers/staging/tidspbridge/rmgr/strm.c +++ b/drivers/staging/tidspbridge/rmgr/strm.c | |||
@@ -119,7 +119,6 @@ int strm_allocate_buffer(struct strm_res_object *strmres, u32 usize, | |||
119 | goto func_end; | 119 | goto func_end; |
120 | 120 | ||
121 | for (i = 0; i < num_bufs; i++) { | 121 | for (i = 0; i < num_bufs; i++) { |
122 | DBC_ASSERT(stream_obj->xlator != NULL); | ||
123 | (void)cmm_xlator_alloc_buf(stream_obj->xlator, &ap_buffer[i], | 122 | (void)cmm_xlator_alloc_buf(stream_obj->xlator, &ap_buffer[i], |
124 | usize); | 123 | usize); |
125 | if (ap_buffer[i] == NULL) { | 124 | if (ap_buffer[i] == NULL) { |
@@ -162,7 +161,6 @@ int strm_close(struct strm_res_object *strmres, | |||
162 | status = | 161 | status = |
163 | (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj, | 162 | (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj, |
164 | &chnl_info_obj); | 163 | &chnl_info_obj); |
165 | DBC_ASSERT(!status); | ||
166 | 164 | ||
167 | if (chnl_info_obj.cio_cs > 0 || chnl_info_obj.cio_reqs > 0) | 165 | if (chnl_info_obj.cio_cs > 0 || chnl_info_obj.cio_reqs > 0) |
168 | status = -EPIPE; | 166 | status = -EPIPE; |
@@ -205,7 +203,6 @@ int strm_create(struct strm_mgr **strm_man, | |||
205 | if (!status) { | 203 | if (!status) { |
206 | (void)dev_get_intf_fxns(dev_obj, | 204 | (void)dev_get_intf_fxns(dev_obj, |
207 | &(strm_mgr_obj->intf_fxns)); | 205 | &(strm_mgr_obj->intf_fxns)); |
208 | DBC_ASSERT(strm_mgr_obj->intf_fxns != NULL); | ||
209 | } | 206 | } |
210 | } | 207 | } |
211 | 208 | ||
@@ -254,7 +251,6 @@ int strm_free_buffer(struct strm_res_object *strmres, u8 ** ap_buffer, | |||
254 | 251 | ||
255 | if (!status) { | 252 | if (!status) { |
256 | for (i = 0; i < num_bufs; i++) { | 253 | for (i = 0; i < num_bufs; i++) { |
257 | DBC_ASSERT(stream_obj->xlator != NULL); | ||
258 | status = | 254 | status = |
259 | cmm_xlator_free_buf(stream_obj->xlator, | 255 | cmm_xlator_free_buf(stream_obj->xlator, |
260 | ap_buffer[i]); | 256 | ap_buffer[i]); |
@@ -302,7 +298,6 @@ int strm_get_info(struct strm_object *stream_obj, | |||
302 | 298 | ||
303 | if (stream_obj->xlator) { | 299 | if (stream_obj->xlator) { |
304 | /* We have a translator */ | 300 | /* We have a translator */ |
305 | DBC_ASSERT(stream_obj->segment_id > 0); | ||
306 | cmm_xlator_info(stream_obj->xlator, (u8 **) &virt_base, 0, | 301 | cmm_xlator_info(stream_obj->xlator, (u8 **) &virt_base, 0, |
307 | stream_obj->segment_id, false); | 302 | stream_obj->segment_id, false); |
308 | } | 303 | } |
@@ -496,14 +491,12 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, | |||
496 | goto func_cont; | 491 | goto func_cont; |
497 | 492 | ||
498 | /* No System DMA */ | 493 | /* No System DMA */ |
499 | DBC_ASSERT(strm_obj->strm_mode != STRMMODE_LDMA); | ||
500 | /* Get the shared mem mgr for this streams dev object */ | 494 | /* Get the shared mem mgr for this streams dev object */ |
501 | status = dev_get_cmm_mgr(strm_mgr_obj->dev_obj, &hcmm_mgr); | 495 | status = dev_get_cmm_mgr(strm_mgr_obj->dev_obj, &hcmm_mgr); |
502 | if (!status) { | 496 | if (!status) { |
503 | /*Allocate a SM addr translator for this strm. */ | 497 | /*Allocate a SM addr translator for this strm. */ |
504 | status = cmm_xlator_create(&strm_obj->xlator, hcmm_mgr, NULL); | 498 | status = cmm_xlator_create(&strm_obj->xlator, hcmm_mgr, NULL); |
505 | if (!status) { | 499 | if (!status) { |
506 | DBC_ASSERT(strm_obj->segment_id > 0); | ||
507 | /* Set translators Virt Addr attributes */ | 500 | /* Set translators Virt Addr attributes */ |
508 | status = cmm_xlator_info(strm_obj->xlator, | 501 | status = cmm_xlator_info(strm_obj->xlator, |
509 | (u8 **) &pattr->virt_base, | 502 | (u8 **) &pattr->virt_base, |
@@ -535,10 +528,6 @@ func_cont: | |||
535 | * strm_mgr_obj->chnl_mgr better be valid or we | 528 | * strm_mgr_obj->chnl_mgr better be valid or we |
536 | * assert here), and then return -EPERM. | 529 | * assert here), and then return -EPERM. |
537 | */ | 530 | */ |
538 | DBC_ASSERT(status == -ENOSR || | ||
539 | status == -ECHRNG || | ||
540 | status == -EALREADY || | ||
541 | status == -EIO); | ||
542 | status = -EPERM; | 531 | status = -EPERM; |
543 | } | 532 | } |
544 | } | 533 | } |