Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206025
b: refs/heads/master
c: b66e098
h: refs/heads/master
i:
  206023: 30031ce
v: v3
  • Loading branch information
Ernesto Ramos authored and Greg Kroah-Hartman committed Jul 28, 2010
1 parent 2c463d6 commit 6d0cee4
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 133 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51d5e099cc9a21960e59bcaee6cc5e2620ea6bb2
refs/heads/master: b66e0986f900db194f637149e68c00345863195b
24 changes: 12 additions & 12 deletions trunk/drivers/staging/tidspbridge/rmgr/dbdcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ int dcd_create_manager(char *sz_zl_dll_name,
DBC_REQUIRE(dcd_mgr);

status = cod_create(&cod_mgr, sz_zl_dll_name, NULL);
if (DSP_FAILED(status))
if (status)
goto func_end;

/* Create a DCD object. */
Expand Down Expand Up @@ -464,7 +464,7 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr,
/* Open COFF file. */
status = cod_open(dcd_mgr_obj->cod_mgr, dcd_key->path,
COD_NOLOAD, &lib);
if (DSP_FAILED(status)) {
if (status) {
status = -EACCES;
goto func_end;
}
Expand All @@ -480,7 +480,7 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr,

/* Get section information. */
status = cod_get_section(lib, sz_sect_name, &ul_addr, &ul_len);
if (DSP_FAILED(status)) {
if (status) {
status = -EACCES;
goto func_end;
}
Expand Down Expand Up @@ -513,7 +513,7 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr,
/* Parse the content of the COFF buffer. */
status =
get_attrs_from_buf(psz_coff_buf, ul_len, obj_type, obj_def);
if (DSP_FAILED(status))
if (status)
status = -EACCES;
} else {
status = -EACCES;
Expand Down Expand Up @@ -557,14 +557,14 @@ int dcd_get_objects(struct dcd_manager *hdcd_mgr,

/* Open DSP coff file, don't load symbols. */
status = cod_open(dcd_mgr_obj->cod_mgr, sz_coff_path, COD_NOLOAD, &lib);
if (DSP_FAILED(status)) {
if (status) {
status = -EACCES;
goto func_cont;
}

/* Get DCD_RESIGER_SECTION section information. */
status = cod_get_section(lib, DCD_REGISTER_SECTION, &ul_addr, &ul_len);
if (DSP_FAILED(status) || !(ul_len > 0)) {
if (status || !(ul_len > 0)) {
status = -EACCES;
goto func_cont;
}
Expand Down Expand Up @@ -617,7 +617,7 @@ int dcd_get_objects(struct dcd_manager *hdcd_mgr,
*/
status =
register_fxn(&dsp_uuid_obj, object_type, handle);
if (DSP_FAILED(status)) {
if (status) {
/* if error occurs, break from while loop. */
break;
}
Expand Down Expand Up @@ -729,7 +729,7 @@ int dcd_get_library_name(struct dcd_manager *hdcd_mgr,
status = -ENOKEY;

/* If can't find, phases might be registered as generic LIBRARYTYPE */
if (DSP_FAILED(status) && phase != NLDR_NOPHASE) {
if (status && phase != NLDR_NOPHASE) {
if (phase_split)
*phase_split = false;

Expand Down Expand Up @@ -872,7 +872,7 @@ int dcd_register_object(struct dsp_uuid *uuid_obj,
status = -EPERM;
}

if (DSP_FAILED(status))
if (status)
goto func_end;

/*
Expand Down Expand Up @@ -1449,14 +1449,14 @@ static int get_dep_lib_info(struct dcd_manager *hdcd_mgr,
/* Get dependent library section information. */
status = cod_get_section(lib, DEPLIBSECT, &ul_addr, &ul_len);

if (DSP_FAILED(status)) {
if (status) {
/* Ok, no dependent libraries */
ul_len = 0;
status = 0;
}
}

if (DSP_FAILED(status) || !(ul_len > 0))
if (status || !(ul_len > 0))
goto func_cont;

/* Allocate zeroed buffer. */
Expand All @@ -1466,7 +1466,7 @@ static int get_dep_lib_info(struct dcd_manager *hdcd_mgr,

/* Read section contents. */
status = cod_read_section(lib, DEPLIBSECT, psz_coff_buf, ul_len);
if (DSP_FAILED(status))
if (status)
goto func_cont;

/* Compress and format DSP buffer to conform to PC format. */
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/staging/tidspbridge/rmgr/disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ int disp_create(struct disp_object **dispatch_obj,

/* check device type and decide if streams or messag'ing is used for
* RMS/EDS */
if (DSP_FAILED(status))
if (status)
goto func_cont;

status = dev_get_dev_type(hdev_obj, &dev_type);

if (DSP_FAILED(status))
if (status)
goto func_cont;

if (dev_type != DSP_UNIT) {
Expand Down Expand Up @@ -168,7 +168,7 @@ int disp_create(struct disp_object **dispatch_obj,
else
delete_disp(disp_obj);

DBC_ENSURE(((DSP_FAILED(status)) && ((*dispatch_obj == NULL))) ||
DBC_ENSURE((status && *dispatch_obj == NULL) ||
(!status && *dispatch_obj));
return status;
}
Expand Down Expand Up @@ -284,7 +284,7 @@ int disp_node_create(struct disp_object *disp_obj,

status = dev_get_dev_type(disp_obj->hdev_obj, &dev_type);

if (DSP_FAILED(status))
if (status)
goto func_end;

if (dev_type != DSP_UNIT) {
Expand Down Expand Up @@ -377,7 +377,7 @@ int disp_node_create(struct disp_object *disp_obj,
node_msg_args.arg_length);
total += dw_length;
}
if (DSP_FAILED(status))
if (status)
goto func_end;

/* If node is a task node, copy task create arguments into buffer */
Expand Down Expand Up @@ -425,7 +425,7 @@ int disp_node_create(struct disp_object *disp_obj,
/* Fill SIO defs and offsets */
offset = sio_defs_offset;
for (i = 0; i < task_arg_obj.num_inputs; i++) {
if (DSP_FAILED(status))
if (status)
break;

pdw_buf[sio_in_def_offset + i] =
Expand Down Expand Up @@ -467,7 +467,7 @@ int disp_node_create(struct disp_object *disp_obj,
* on the DSP-side
*/
status = (((rms_word *) (disp_obj->pbuf))[0]);
if (DSP_FAILED(status))
if (status < 0)
dev_dbg(bridge, "%s: DSP-side failed: 0x%x\n",
__func__, status);
}
Expand Down Expand Up @@ -520,7 +520,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* function on the DSP-side
*/
status = (((rms_word *) (disp_obj->pbuf))[0]);
if (DSP_FAILED(status))
if (status < 0)
dev_dbg(bridge, "%s: DSP-side failed: "
"0x%x\n", __func__, status);
}
Expand Down Expand Up @@ -573,7 +573,7 @@ int disp_node_run(struct disp_object *disp_obj,
* function on the DSP-side
*/
status = (((rms_word *) (disp_obj->pbuf))[0]);
if (DSP_FAILED(status))
if (status < 0)
dev_dbg(bridge, "%s: DSP-side failed: "
"0x%x\n", __func__, status);
}
Expand Down Expand Up @@ -603,7 +603,7 @@ static void delete_disp(struct disp_object *disp_obj)
* is invalid. */
status = (*intf_fxns->pfn_chnl_close)
(disp_obj->chnl_from_dsp);
if (DSP_FAILED(status)) {
if (status) {
dev_dbg(bridge, "%s: Failed to close channel "
"from RMS: 0x%x\n", __func__, status);
}
Expand All @@ -612,7 +612,7 @@ static void delete_disp(struct disp_object *disp_obj)
status =
(*intf_fxns->pfn_chnl_close) (disp_obj->
chnl_to_dsp);
if (DSP_FAILED(status)) {
if (status) {
dev_dbg(bridge, "%s: Failed to close channel to"
" RMS: 0x%x\n", __func__, status);
}
Expand Down Expand Up @@ -704,7 +704,7 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
/* Send the command */
status = (*intf_fxns->pfn_chnl_add_io_req) (chnl_obj, pbuf, ul_bytes, 0,
0L, dw_arg);
if (DSP_FAILED(status))
if (status)
goto func_end;

status =
Expand All @@ -718,14 +718,14 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
}
}
/* Get the reply */
if (DSP_FAILED(status))
if (status)
goto func_end;

chnl_obj = disp_obj->chnl_from_dsp;
ul_bytes = REPLYSIZE;
status = (*intf_fxns->pfn_chnl_add_io_req) (chnl_obj, pbuf, ul_bytes,
0, 0L, dw_arg);
if (DSP_FAILED(status))
if (status)
goto func_end;

status =
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/tidspbridge/rmgr/drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int drv_remove_all_dmm_res_elements(void *process_ctxt)
list_for_each_entry_safe(map_obj, temp_map, &ctxt->dmm_map_list, link) {
status = proc_un_map(ctxt->hprocessor,
(void *)map_obj->dsp_addr, ctxt);
if (DSP_FAILED(status))
if (status)
pr_err("%s: proc_un_map failed!"
" status = 0x%xn", __func__, status);
}
Expand All @@ -190,7 +190,7 @@ int drv_remove_all_dmm_res_elements(void *process_ctxt)
status = proc_un_reserve_memory(ctxt->hprocessor, (void *)
rsv_obj->dsp_reserved_addr,
ctxt);
if (DSP_FAILED(status))
if (status)
pr_err("%s: proc_un_reserve_memory failed!"
" status = 0x%xn", __func__, status);
}
Expand Down Expand Up @@ -464,7 +464,7 @@ int drv_create(struct drv_object **drv_obj)
kfree(pdrv_object);
}

DBC_ENSURE(DSP_FAILED(status) || pdrv_object);
DBC_ENSURE(status || pdrv_object);
return status;
}

Expand Down Expand Up @@ -767,7 +767,7 @@ int drv_request_resources(u32 dw_context, u32 *dev_node_strg)

DBC_ENSURE((!status && dev_node_strg != NULL &&
!LST_IS_EMPTY(pdrv_object->dev_node_string)) ||
(DSP_FAILED(status) && *dev_node_strg == 0));
(status && *dev_node_strg == 0));

return status;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/tidspbridge/rmgr/drv_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static void bridge_recover(struct work_struct *work)
}
dev = dev_get_first();
dev_get_dev_node(dev, &dev_node);
if (!dev_node || DSP_FAILED(proc_auto_start(dev_node, dev)))
if (!dev_node || proc_auto_start(dev_node, dev))
pr_err("DSP could not be restarted\n");
recover = false;
complete_all(&bridge_open_comp);
Expand Down Expand Up @@ -397,7 +397,7 @@ static int __devexit omap34_xx_bridge_remove(struct platform_device *pdev)
void *hdrv_obj = NULL;

status = cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT);
if (DSP_FAILED(status))
if (status)
goto func_cont;

#ifdef CONFIG_TIDSPBRIDGE_DVFS
Expand Down Expand Up @@ -439,7 +439,7 @@ static int BRIDGE_SUSPEND(struct platform_device *pdev, pm_message_t state)
u32 command = PWR_EMERGENCYDEEPSLEEP;

status = pwr_sleep_dsp(command, time_out);
if (DSP_FAILED(status))
if (status)
return -1;

bridge_suspend_data.suspended = 1;
Expand All @@ -451,7 +451,7 @@ static int BRIDGE_RESUME(struct platform_device *pdev)
u32 status;

status = pwr_wake_dsp(time_out);
if (DSP_FAILED(status))
if (status)
return -1;

bridge_suspend_data.suspended = 0;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/tidspbridge/rmgr/dspdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ u32 dsp_init(u32 *init_status)
goto func_cont;

status = drv_create(&drv_obj);
if (DSP_FAILED(status)) {
if (status) {
api_exit();
goto func_cont;
}
Expand All @@ -68,7 +68,7 @@ u32 dsp_init(u32 *init_status)
/* Attempt to Start the Device */
status = dev_start_device((struct cfg_devnode *)
device_node_string);
if (DSP_FAILED(status))
if (status)
(void)drv_release_resources
((u32) device_node_string, drv_obj);
} else {
Expand All @@ -77,7 +77,7 @@ u32 dsp_init(u32 *init_status)
}

/* Unwind whatever was loaded */
if (DSP_FAILED(status)) {
if (status) {
/* irrespective of the status of dev_remove_device we conitinue
* unloading. Get the Driver Object iterate through and remove.
* Reset the status to E_FAIL to avoid going through
Expand Down Expand Up @@ -106,7 +106,7 @@ u32 dsp_init(u32 *init_status)
dev_dbg(bridge, "%s: Failed\n", __func__);
} /* End api_init_complete2 */
DBC_ENSURE((!status && drv_obj != NULL) ||
(DSP_FAILED(status) && drv_obj == NULL));
(status && drv_obj == NULL));
*init_status = status;
/* Return the Driver Object */
return (u32) drv_obj;
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/tidspbridge/rmgr/mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int mgr_create(struct mgr_object **mgr_obj,
status = -ENOMEM;
}

DBC_ENSURE(DSP_FAILED(status) || pmgr_obj);
DBC_ENSURE(status || pmgr_obj);
return status;
}

Expand Down Expand Up @@ -132,7 +132,7 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,
*pu_num_nodes = 0;
/* Get The Manager Object from the Registry */
status = cfg_get_object((u32 *) &pmgr_obj, REG_MGR_OBJECT);
if (DSP_FAILED(status))
if (status)
goto func_cont;

DBC_ASSERT(pmgr_obj);
Expand Down Expand Up @@ -167,7 +167,7 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,

func_cont:
DBC_ENSURE((!status && *pu_num_nodes > 0) ||
(DSP_FAILED(status) && *pu_num_nodes == 0));
(status && *pu_num_nodes == 0));

return status;
}
Expand Down Expand Up @@ -216,11 +216,11 @@ int mgr_enum_processor_info(u32 processor_id,
processor_info->processor_type = DSPTYPE64;
}
}
if (DSP_FAILED(status))
if (status)
goto func_end;

/* Get The Manager Object from the Registry */
if (DSP_FAILED(cfg_get_object((u32 *) &pmgr_obj, REG_MGR_OBJECT))) {
if (cfg_get_object((u32 *) &pmgr_obj, REG_MGR_OBJECT)) {
dev_dbg(bridge, "%s: Failed to get MGR Object\n", __func__);
goto func_end;
}
Expand Down Expand Up @@ -319,7 +319,7 @@ int mgr_get_dcd_handle(struct mgr_object *mgr_handle,
status = 0;
}
DBC_ENSURE((!status && *dcd_handle != (u32) NULL) ||
(DSP_FAILED(status) && *dcd_handle == (u32) NULL));
(status && *dcd_handle == (u32) NULL));

return status;
}
Expand Down
Loading

0 comments on commit 6d0cee4

Please sign in to comment.