@@ -31,7 +31,7 @@
* args: Argument structure.
* pResult:
* Returns:
- * DSP_SOK if command called; DSP_EINVALIDARG if command not in IOCTL
+ * DSP_SOK if command called; EINVAL if command not in IOCTL
* table.
* Requires:
* Ensures:
@@ -61,7 +61,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
* Returns:
* DSP_SOK: Success;
* EFAULT: hdev_obj is invalid.
- * DSP_EINVALIDARG: max_channels is 0.
+ * EINVAL: max_channels is 0.
* DSP_EMEMORY: Insufficient memory for requested resources.
* CHNL_E_ISR: Unable to plug channel ISR for configured IRQ.
* CHNL_E_MAXCHANNELS: This manager cannot handle this many channels.
@@ -176,7 +176,7 @@ extern dsp_status cmm_get_handle(void *hprocessor,
* Returns:
* DSP_SOK: Success.
* EFAULT: Invalid handle.
- * DSP_EINVALIDARG Invalid input argument.
+ * EINVAL Invalid input argument.
* Requires:
* Ensures:
*
@@ -214,7 +214,7 @@ extern bool cmm_init(void);
* Returns:
* DSP_SOK: Success.
* EFAULT: Invalid hcmm_mgr handle.
- * DSP_EINVALIDARG: Invalid input argument.
+ * EINVAL: Invalid input argument.
* DSP_EFAIL: Unable to register.
* - On success *pulSegId is a valid SM segment ID.
* Requires:
@@ -245,7 +245,7 @@ extern dsp_status cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
* Returns:
* DSP_SOK: Success.
* EFAULT: Invalid handle.
- * DSP_EINVALIDARG: Invalid ul_seg_id.
+ * EINVAL: Invalid ul_seg_id.
* DSP_EFAIL: Unable to unregister for unknown reason.
* Requires:
* Ensures:
@@ -286,7 +286,7 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
* pXlatorAttrs: Translator attributes used for the client NODE or STREAM.
* Returns:
* DSP_SOK: Success.
- * DSP_EINVALIDARG: Bad input Attrs.
+ * EINVAL: Bad input Attrs.
* DSP_EMEMORY: Insufficient memory(local) for requested resources.
* Requires:
* phXlator != NULL
@@ -640,7 +640,7 @@ extern dsp_status dev_remove_proc_object(struct dev_object
* ulStatus: A status word, most likely a BRD_STATUS.
* Returns:
* DSP_SOK: All registered clients were asynchronously notified.
- * DSP_EINVALIDARG: Invalid hdev_obj.
+ * EINVAL: Invalid hdev_obj.
* Requires:
* DEV Initialized.
* Ensures:
@@ -90,9 +90,6 @@
/* A general failure occurred */
#define DSP_EFAIL (DSP_EBASE + 8)
-/* An invalid argument was specified. */
-#define DSP_EINVALIDARG (DSP_EBASE + 0xb)
-
/* A memory allocation failure occurred. */
#define DSP_EMEMORY (DSP_EBASE + 0xc)
@@ -102,7 +102,7 @@ extern dsp_status mgr_destroy(struct mgr_object *hmgr_obj);
* in the database will be returned.
* Returns:
* DSP_SOK: Success.
- * DSP_EINVALIDARG: Parameter node_id is > than the number of nodes.
+ * EINVAL: Parameter node_id is > than the number of nodes.
* configutred in the system
* DSP_ECHANGEDURINGENUM: During Enumeration there has been a change in
* the number of nodes configured or in the
@@ -136,7 +136,7 @@ extern dsp_status mgr_enum_node_info(u32 node_id,
* in the database will be returned
* Returns:
* DSP_SOK: Success.
- * DSP_EINVALIDARG: Parameter processor_id is > than the number of
+ * EINVAL: Parameter processor_id is > than the number of
* DSP Processors in the system.
* DSP_EFAIL: Failed to querry the Node Data Base
* Requires:
@@ -40,7 +40,7 @@
* Returns:
* DSP_SOK: Success.
* DSP_SALREADYASLEEP: Success, but the DSP was already asleep.
- * DSP_EINVALIDARG: The specified sleepCode is not supported.
+ * EINVAL: The specified sleepCode is not supported.
* DSP_ETIMEOUT: A timeout occured while waiting for DSP sleep
* confirmation.
* DSP_EFAIL: General failure, unable to send sleep command to
@@ -186,7 +186,7 @@ extern dsp_status sync_leave_cs(IN struct sync_csobject *hcs_obj);
* DSP_SOK: Success.
* DSP_EFAIL: Unable to create user mode event.
* DSP_EMEMORY: Insufficient memory.
- * DSP_EINVALIDARG sync_attrs values are invalid.
+ * EINVAL sync_attrs values are invalid.
* Requires:
* - SYNC initialized.
* - ph_event != NULL.
@@ -391,7 +391,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* DSP_SOK: Success.
* EFAULT: hchnl_mgr is invalid.
* DSP_EMEMORY: Insufficient memory for requested resources.
- * DSP_EINVALIDARG: Invalid number of IOReqs.
+ * EINVAL: Invalid number of IOReqs.
* CHNL_E_OUTOFSTREAMS: No free channels available.
* CHNL_E_BADCHANID: Channel ID is out of range.
* CHNL_E_CHANBUSY: Channel is in use.
@@ -72,7 +72,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,
(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS))
status = DSP_SOK;
else if (pMgrAttrs->max_channels == 0)
- status = DSP_EINVALIDARG;
+ status = EINVAL;
else
status = CHNL_E_MAXCHANNELS;
@@ -584,7 +584,7 @@ dsp_status cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
/* Check if input ul_size is big enough to alloc at least one block */
if (DSP_SUCCEEDED(status)) {
if (ul_size < cmm_mgr_obj->ul_min_block_size) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
goto func_end;
}
}
@@ -698,7 +698,7 @@ dsp_status cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
ul_id++;
} /* end while */
} else {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
}
} else {
status = EFAULT;
@@ -154,7 +154,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
return dw_bytes_read / size;
}
- return DSP_EINVALIDARG;
+ return EINVAL;
}
static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin)
@@ -505,7 +505,7 @@ u32 mgrwrap_register_object(union Trapped_Args *args, void *pr_ctxt)
}
if (args->args_mgr_registerobject.obj_type >= DSP_DCDMAXOBJTYPE)
- return DSP_EINVALIDARG;
+ return EINVAL;
status = dcd_register_object(&uuid_obj,
args->args_mgr_registerobject.obj_type,
@@ -547,7 +547,7 @@ u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args, void *pr_ctxt)
u32 count = args->args_mgr_wait.count;
if (count > MAX_EVENTS)
- status = DSP_EINVALIDARG;
+ status = EINVAL;
/* get the array of pointers to user structures */
CP_FM_USR(anotifications, args->args_mgr_wait.anotifications,
@@ -688,7 +688,7 @@ u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt)
if (args->args_proc_flushmemory.ul_flags >
PROC_WRITEBACK_INVALIDATE_MEM)
- return DSP_EINVALIDARG;
+ return EINVAL;
status = proc_flush_memory(args->args_proc_flushmemory.hprocessor,
args->args_proc_flushmemory.pmpu_addr,
@@ -796,7 +796,7 @@ u32 procwrap_load(union Trapped_Args *args, void *pr_ctxt)
u8 **argv = NULL, **envp = NULL;
if (count <= 0 || count > MAX_LOADARGS) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
goto func_cont;
}
@@ -918,7 +918,7 @@ u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt)
args->args_proc_mapmem.ul_map_attr, pr_ctxt);
if (DSP_SUCCEEDED(status)) {
if (put_user(map_addr, args->args_proc_mapmem.pp_map_addr)) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
proc_un_map(args->args_proc_mapmem.hprocessor,
map_addr, pr_ctxt);
}
@@ -966,7 +966,7 @@ u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt)
pr_ctxt);
if (DSP_SUCCEEDED(status)) {
if (put_user(prsv_addr, args->args_proc_rsvmem.pp_rsv_addr)) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
proc_un_reserve_memory(args->args_proc_rsvmem.
hprocessor, prsv_addr, pr_ctxt);
}
@@ -1377,7 +1377,7 @@ u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt)
u32 num_bufs = args->args_strm_allocatebuffer.num_bufs;
if (num_bufs > MAX_BUFS)
- return DSP_EINVALIDARG;
+ return EINVAL;
ap_buffer = mem_alloc((num_bufs * sizeof(u8 *)), MEM_NONPAGED);
@@ -1416,7 +1416,7 @@ u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt)
u32 num_bufs = args->args_strm_freebuffer.num_bufs;
if (num_bufs > MAX_BUFS)
- return DSP_EINVALIDARG;
+ return EINVAL;
ap_buffer = mem_alloc((num_bufs * sizeof(u8 *)), MEM_NONPAGED);
@@ -1592,7 +1592,7 @@ u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt)
dsp_status status = DSP_SOK;
if (args->args_strm_select.strm_num > MAX_STREAMS)
- return DSP_EINVALIDARG;
+ return EINVAL;
CP_FM_USR(strm_tab, args->args_strm_select.stream_tab, status,
args->args_strm_select.strm_num);
@@ -676,7 +676,7 @@ dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
sprintf(sz_obj_type, "%d", DSP_DCDLIBRARYTYPE);
break;
default:
- status = DSP_EINVALIDARG;
+ status = EINVAL;
DBC_ASSERT(false);
}
if (DSP_SUCCEEDED(status)) {
@@ -274,7 +274,7 @@ static int __devinit omap34_xx_bridge_probe(struct platform_device *pdev)
init_status = reg_set_value(SHMSIZE, (u8 *) &shm_size,
sizeof(shm_size));
} else {
- init_status = DSP_EINVALIDARG;
+ init_status = EINVAL;
status = -1;
pr_err("%s: shm size must be at least 64 KB\n", __func__);
}
@@ -157,7 +157,7 @@ dsp_status mgr_enum_node_info(u32 node_id, OUT struct dsp_ndbprops *pndb_props,
}
if (DSP_SUCCEEDED(status)) {
if (node_id > (node_index - 1)) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
} else {
status = dcd_get_object_def(pmgr_obj->hdcd_mgr,
(struct dsp_uuid *)
@@ -422,7 +422,7 @@ dsp_status node_allocate(struct proc_object *hprocessor,
if (((attr_in->heap_size) & (PG_SIZE4K - 1))) {
pr_err("%s: node heap size not aligned to 4K, size = 0x%x \n",
__func__, attr_in->heap_size);
- status = DSP_EINVALIDARG;
+ status = EINVAL;
} else {
pnode->create_args.asa.task_arg_obj.heap_size =
attr_in->heap_size;
@@ -64,9 +64,9 @@ dsp_status pwr_sleep_dsp(IN CONST u32 sleepCode, IN CONST u32 timeout)
else if (sleepCode == PWR_EMERGENCYDEEPSLEEP)
ioctlcode = WMDIOCTL_EMERGENCYSLEEP;
else
- status = DSP_EINVALIDARG;
+ status = EINVAL;
- if (status != DSP_EINVALIDARG) {
+ if (status != EINVAL) {
status = (*intf_fxns->pfn_dev_cntrl) (dw_context,
ioctlcode,
(void *)&arg);
@@ -586,7 +586,7 @@ func_cont:
* something documented
*/
if (status != DSP_EMEMORY && status !=
- DSP_EINVALIDARG && status != DSP_EFAIL) {
+ EINVAL && status != DSP_EFAIL) {
/*
* We got a status that's not return-able.
* Assert that we got something we were
@@ -210,7 +210,7 @@ dsp_status cfg_get_host_resources(struct cfg_devnode *dev_node_obj,
*/
dsp_status cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
{
- dsp_status status = DSP_EINVALIDARG;
+ dsp_status status = EINVAL;
u32 dw_buf_size;
DBC_REQUIRE(pdwValue != NULL);
@@ -298,7 +298,7 @@ dsp_status cfg_set_dev_object(struct cfg_devnode *dev_node_obj, u32 dwValue)
*/
dsp_status cfg_set_object(u32 dwValue, u32 dw_type)
{
- dsp_status status = DSP_EINVALIDARG;
+ dsp_status status = EINVAL;
u32 dw_buff_size;
dw_buff_size = sizeof(dwValue);
@@ -499,7 +499,7 @@ dsp_status bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)
if (MEM_IS_VALID_HANDLE(pchnl, CHNL_SIGNATURE)) {
if ((dwTimeOut == CHNL_IOCNOWAIT)
&& CHNL_IS_OUTPUT(pchnl->chnl_mode)) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
} else {
chnl_mode = pchnl->chnl_mode;
chnl_mgr_obj = pchnl->chnl_mgr_obj;
@@ -801,7 +801,7 @@ dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl,
*phChnl = NULL;
/* Validate Args: */
if (pattrs->uio_reqs == 0) {
- status = DSP_EINVALIDARG;
+ status = EINVAL;
} else {
if (!MEM_IS_VALID_HANDLE(hchnl_mgr, CHNL_MGRSIGNATURE)) {
status = EFAULT;
@@ -1306,7 +1306,7 @@ static dsp_status bridge_brd_mem_map(struct wmd_dev_context *hDevContext,
__func__, hDevContext, ul_mpu_addr, ulVirtAddr, ul_num_bytes,
ul_map_attr);
if (ul_num_bytes == 0)
- return DSP_EINVALIDARG;
+ return EINVAL;
if (ul_map_attr != 0) {
attrs = ul_map_attr;
@@ -1341,7 +1341,7 @@ static dsp_status bridge_brd_mem_map(struct wmd_dev_context *hDevContext,
* Mixedsize isn't enabled, so size can't be
* zero here
*/
- return DSP_EINVALIDARG;
+ return EINVAL;
}
}
if (attrs & DSP_MAPDONOTLOCK)
@@ -1395,7 +1395,7 @@ static dsp_status bridge_brd_mem_map(struct wmd_dev_context *hDevContext,
if (!vma) {
pr_err("%s: Failed to get VMA region for 0x%x (%d)\n",
__func__, ul_mpu_addr, ul_num_bytes);
- status = DSP_EINVALIDARG;
+ status = EINVAL;
up_read(&mm->mmap_sem);
goto func_cont;
}
@@ -167,7 +167,7 @@ dsp_status sleep_dsp(struct wmd_dev_context *dev_context, IN u32 dw_cmd,
/* Check if sleep code is valid */
if ((dw_cmd != PWR_DEEPSLEEP) && (dw_cmd != PWR_EMERGENCYDEEPSLEEP))
- return DSP_EINVALIDARG;
+ return EINVAL;
status = cfg_get_host_resources((struct cfg_devnode *)
drv_get_first_dev_extension(),