diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2012-02-07 03:39:35 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-09 21:38:19 +0400 |
commit | 40e6336d1bdc10f072b6563dfb1255b5c4b039a2 (patch) | |
tree | cc6aae8dfc2f8102771469247a0d55ead38178a3 /drivers/staging/tidspbridge/pmgr | |
parent | 276cc746d58b73aa4e046745441b8cf56858f9ef (diff) | |
download | linux-40e6336d1bdc10f072b6563dfb1255b5c4b039a2.tar.xz |
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/pmgr')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/cmm.c | 6 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dbll.c | 3 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dev.c | 6 |
3 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c index 2eeb53709270..0d19bcd4ce2c 100644 --- a/drivers/staging/tidspbridge/pmgr/cmm.c +++ b/drivers/staging/tidspbridge/pmgr/cmm.c @@ -253,8 +253,6 @@ int cmm_create(struct cmm_object **ph_cmm_mgr, if (mgr_attrts == NULL) mgr_attrts = &cmm_dfltmgrattrs; /* set defaults */ - /* 4 bytes minimum */ - DBC_ASSERT(mgr_attrts->min_block_size >= 4); /* save away smallest block allocation for this cmm mgr */ cmm_obj->min_block_size = mgr_attrts->min_block_size; cmm_obj->page_size = PAGE_SIZE; @@ -849,7 +847,8 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va) if (status) { /* Uh oh, this shouldn't happen. Descriptor * gone! */ - DBC_ASSERT(false); /* CMM is leaking mem */ + pr_err("%s, line %d: Assertion failed\n", + __FILE__, __LINE__); } } } @@ -898,7 +897,6 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr, cmm_mgr_obj = (struct cmm_object *)xlator_obj->cmm_mgr; /* get this translator's default SM allocator */ - DBC_ASSERT(xlator_obj->seg_id > 0); allocator = cmm_mgr_obj->pa_gppsm_seg_tab[xlator_obj->seg_id - 1]; if (!allocator) goto loop_cont; diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c index db1af795544d..997feebbf74d 100644 --- a/drivers/staging/tidspbridge/pmgr/dbll.c +++ b/drivers/staging/tidspbridge/pmgr/dbll.c @@ -936,9 +936,6 @@ static struct dynload_symbol *dbll_find_symbol(struct dynamic_loader_sym *this, if (!status && gbl_search) dev_dbg(bridge, "%s: Symbol not found: %s\n", __func__, name); - DBC_ASSERT((status && (dbll_sym != NULL)) - || (!status && (dbll_sym == NULL))); - ret_sym = (struct dynload_symbol *)dbll_sym; return ret_sym; } diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c index e4257fd7ff06..980bd532fb80 100644 --- a/drivers/staging/tidspbridge/pmgr/dev.c +++ b/drivers/staging/tidspbridge/pmgr/dev.c @@ -108,7 +108,6 @@ u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf, if (dev_obj) { /* Require of BrdWrite() */ - DBC_ASSERT(dev_obj->bridge_context != NULL); status = (*dev_obj->bridge_interface.brd_write) ( dev_obj->bridge_context, host_buf, dsp_add, ul_num_bytes, mem_space); @@ -164,7 +163,6 @@ int dev_create_device(struct dev_object **device_obj, /* Create the device object, and pass a handle to the Bridge driver for * storage. */ if (!status) { - DBC_ASSERT(drv_fxns); dev_obj = kzalloc(sizeof(struct dev_object), GFP_KERNEL); if (dev_obj) { /* Fill out the rest of the Dev Object structure: */ @@ -186,9 +184,6 @@ int dev_create_device(struct dev_object **device_obj, status = (dev_obj->bridge_interface.dev_create) (&dev_obj->bridge_context, dev_obj, host_res); - /* Assert bridge_dev_create()'s ensure clause: */ - DBC_ASSERT(status - || (dev_obj->bridge_context != NULL)); } else { status = -ENOMEM; } @@ -282,7 +277,6 @@ int dev_create2(struct dev_object *hdev_obj) struct dev_object *dev_obj = hdev_obj; /* There can be only one Node Manager per DEV object */ - DBC_ASSERT(!dev_obj->node_mgr); status = node_create_mgr(&dev_obj->node_mgr, hdev_obj); if (status) dev_obj->node_mgr = NULL; |