@@ -172,10 +172,10 @@ extern void mem_free_phys_mem(void *pVirtualAddress,
* A subsequent call to MEM_IS_VALID_HANDLE() will fail for this object.
*/
#define MEM_FREE_OBJECT(pObj) \
-{ \
- pObj->dw_signature = 0x00; \
- kfree(pObj); \
-}
+do { \
+ pObj->dw_signature = 0x00; \
+ kfree(pObj); \
+} while (0)
/*
* ======== mem_get_num_pages ======== diff --git a/drivers/dsp/bridge/dynload/cload.c b/drivers/dsp/bridge/dynload/cload.c
@@ -48,8 +48,8 @@ static const char loader_dllview_root[] = { "?DLModules?" };
*/
static const char readstrm[] = { "Error reading %s from input stream" }; static const char err_alloc[] = { "Syms->dload_allocate( %d ) failed" }; -static const char tgtalloc[] =
- { "Target memory allocate failed, section %s size " FMT_UI32 };
+static const char tgtalloc[] = {
+ "Target memory allocate failed, section %s size " FMT_UI32 };
static const char initfail[] = { "%s to target address " FMT_UI32 " failed" }; static const char dlvwrite[] = { "Write to DLLview list failed" }; static const char iconnect[] = { "Connect call to init interface failed" }; diff --git a/drivers/dsp/bridge/pmgr/cmm.c b/drivers/dsp/bridge/pmgr/cmm.c index 7523361..8c770da 100644
@@ -1010,11 +1010,10 @@ dsp_status cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool bForce)
DBC_REQUIRE(refs > 0);
- if (MEM_IS_VALID_HANDLE(xlator_obj, CMMXLATESIGNATURE)) {
+ if (MEM_IS_VALID_HANDLE(xlator_obj, CMMXLATESIGNATURE))
MEM_FREE_OBJECT(xlator_obj);
- } else {
+ else
status = DSP_EHANDLE;
- }
return status;
}
@@ -848,9 +848,8 @@ void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs)
&zl_lib->symbol.dl_symbol,
&zl_lib->allocate.dl_alloc,
&zl_lib->init.dl_init);
- if (err != 0) {
+ if (err != 0)
dev_dbg(bridge, "%s: failed: 0x%x\n", __func__, err);
- }
}
/* remove symbols from symbol table */
if (zl_lib->sym_tab != NULL) {
@@ -578,9 +578,8 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
ae_proc[ndx].ul_gpp_va,
ae_proc[ndx].ul_dsp_va *
hio_mgr->word_size, page_size[i]);
- if (DSP_FAILED(status)) {
+ if (DSP_FAILED(status))
goto func_end;
- }
}
pa_curr += page_size[i];
va_curr += page_size[i];
@@ -228,9 +228,8 @@ dsp_status sleep_dsp(struct wmd_dev_context *dev_context, IN u32 dw_cmd,
/* Turn off DSP Peripheral clocks */
status = dsp_peripheral_clocks_disable(dev_context, NULL);
- if (DSP_FAILED(status)) {
+ if (DSP_FAILED(status))
return status;
- }
#ifdef CONFIG_BRIDGE_DVFS
else if (target_pwr_state == PWRDM_POWER_OFF) {
struct dspbridge_platform_data *pdata = @@ -357,9 +356,8 @@ dsp_status dsp_peripheral_clk_ctrl(struct wmd_dev_context *dev_context,