Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51d5e099 authored by Ernesto Ramos's avatar Ernesto Ramos Committed by Greg Kroah-Hartman
Browse files

staging:ti dspbridge: remove DSP_FAILED macro from pmgr



Since status succeeded is 0, DSP_FAILED macro
is not necessary anymore.

Signed-off-by: default avatarErnesto Ramos <ernesto@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d1b2216d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ int chnl_create(struct chnl_mgr **channel_mgr,
		}
	}

	DBC_ENSURE(DSP_FAILED(status) || chnl_mgr_obj);
	DBC_ENSURE(status || chnl_mgr_obj);

	return status;
}
+1 −1
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
		if (buf_pa) {
			status = cmm_free_buf(xlator_obj->hcmm_mgr, buf_pa,
					      xlator_obj->ul_seg_id);
			if (DSP_FAILED(status)) {
			if (status) {
				/* Uh oh, this shouldn't happen. Descriptor
				 * gone! */
				DBC_ASSERT(false);	/* CMM is leaking mem */
+4 −4
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ int cod_create(struct cod_manager **mgr, char *str_zl_file,

	status = mgr_new->fxns.create_fxn(&mgr_new->target, &zl_attrs);

	if (DSP_FAILED(status)) {
	if (status) {
		cod_delete(mgr_new);
		return -ESPIPE;
	}
@@ -529,7 +529,7 @@ int cod_load_base(struct cod_manager *cod_mgr_obj, u32 num_argc, char *args[],
	status = cod_mgr_obj->fxns.load_fxn(cod_mgr_obj->base_lib, flags,
					    &new_attrs,
					    &cod_mgr_obj->ul_entry);
	if (DSP_FAILED(status))
	if (status)
		cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);

	if (!status)
@@ -570,7 +570,7 @@ int cod_open(struct cod_manager *hmgr, char *sz_coff_path,
			*lib_obj = lib;
	}

	if (DSP_FAILED(status))
	if (status)
		pr_err("%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n",
		       __func__, status, sz_coff_path, flags);
	return status;
@@ -608,7 +608,7 @@ int cod_open_base(struct cod_manager *hmgr, char *sz_coff_path,
		hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0';
	}

	if (DSP_FAILED(status))
	if (status)
		pr_err("%s: error status 0x%x sz_coff_path: %s\n", __func__,
		       status, sz_coff_path);
	return status;
+6 −6
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ int dbll_create(struct dbll_tar_obj **target_obj,
			*target_obj = (struct dbll_tar_obj *)pzl_target;
		}
		DBC_ENSURE((!status && *target_obj) ||
				(DSP_FAILED(status) && *target_obj == NULL));
				(status && *target_obj == NULL));
	}

	return status;
@@ -559,7 +559,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
	if (opened_doff)
		dof_close(zl_lib);

	DBC_ENSURE(DSP_FAILED(status) || zl_lib->load_ref > 0);
	DBC_ENSURE(status || zl_lib->load_ref > 0);

	dev_dbg(bridge, "%s: lib: %p flags: 0x%x entry: %p, status 0x%x\n",
		__func__, lib, flags, entry, status);
@@ -631,7 +631,7 @@ int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,
	/*
	 *  Set up objects needed by the dynamic loader
	 */
	if (DSP_FAILED(status))
	if (status)
		goto func_cont;

	/* Stream */
@@ -713,7 +713,7 @@ int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,

	}
	DBC_ENSURE((!status && (zl_lib->open_ref > 0) && *lib_obj)
				|| (DSP_FAILED(status) && *lib_obj == NULL));
				|| (status && *lib_obj == NULL));

	dev_dbg(bridge, "%s: target: %p file: %s lib_obj: %p, status 0x%x\n",
		__func__, target, file, lib_obj, status);
@@ -756,7 +756,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
	} else {
		status = -EFAULT;
	}
	if (DSP_FAILED(status))
	if (status)
		goto func_cont;

	byte_size = 1;
@@ -1314,7 +1314,7 @@ static int dbll_rmm_alloc(struct dynamic_loader_allocate *this,
						    (u32 *) &rmm_addr_obj,
						    seg_id, req, false);
	}
	if (DSP_FAILED(status)) {
	if (status) {
		ret = false;
	} else {
		/* RMM gives word address. Need to convert to byte address */
+11 −13
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ int dev_create_device(struct dev_object **device_obj,

	status = drv_request_bridge_res_dsp((void *)&host_res);

	if (DSP_FAILED(status)) {
	if (status) {
		dev_dbg(bridge, "%s: Failed to reserve bridge resources\n",
			__func__);
		goto leave;
@@ -158,7 +158,7 @@ int dev_create_device(struct dev_object **device_obj,

	/*  Get the Bridge driver interface functions */
	bridge_drv_entry(&drv_fxns, driver_file_name);
	if (DSP_FAILED(cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT))) {
	if (cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT)) {
		/* don't propogate CFG errors from this PROC function */
		status = -EPERM;
	}
@@ -189,7 +189,7 @@ int dev_create_device(struct dev_object **device_obj,
			    (&dev_obj->hbridge_context, dev_obj,
			     host_res);
			/* Assert bridge_dev_create()'s ensure clause: */
			DBC_ASSERT(DSP_FAILED(status)
			DBC_ASSERT(status
				   || (dev_obj->hbridge_context != NULL));
		} else {
			status = -ENOMEM;
@@ -276,8 +276,7 @@ int dev_create_device(struct dev_object **device_obj,
		*device_obj = NULL;
	}

	DBC_ENSURE((!status && *device_obj) ||
		   (DSP_FAILED(status) && !*device_obj));
	DBC_ENSURE((!status && *device_obj) || (status && !*device_obj));
	return status;
}

@@ -299,11 +298,11 @@ int dev_create2(struct dev_object *hdev_obj)
	/* There can be only one Node Manager per DEV object */
	DBC_ASSERT(!dev_obj->hnode_mgr);
	status = node_create_mgr(&dev_obj->hnode_mgr, hdev_obj);
	if (DSP_FAILED(status))
	if (status)
		dev_obj->hnode_mgr = NULL;

	DBC_ENSURE((!status && dev_obj->hnode_mgr != NULL)
		   || (DSP_FAILED(status) && dev_obj->hnode_mgr == NULL));
		   || (status && dev_obj->hnode_mgr == NULL));
	return status;
}

@@ -321,15 +320,14 @@ int dev_destroy2(struct dev_object *hdev_obj)
	DBC_REQUIRE(hdev_obj);

	if (dev_obj->hnode_mgr) {
		if (DSP_FAILED(node_delete_mgr(dev_obj->hnode_mgr)))
		if (node_delete_mgr(dev_obj->hnode_mgr))
			status = -EPERM;
		else
			dev_obj->hnode_mgr = NULL;

	}

	DBC_ENSURE((!status && dev_obj->hnode_mgr == NULL) ||
		   DSP_FAILED(status));
	DBC_ENSURE((!status && dev_obj->hnode_mgr == NULL) || status);
	return status;
}

@@ -847,7 +845,7 @@ int dev_set_chnl_mgr(struct dev_object *hdev_obj,
	else
		status = -EFAULT;

	DBC_ENSURE(DSP_FAILED(status) || (dev_obj->hchnl_mgr == hmgr));
	DBC_ENSURE(status || (dev_obj->hchnl_mgr == hmgr));
	return status;
}

@@ -885,7 +883,7 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
	if (!status) {
		/* Store away the hdev_obj with the DEVNODE */
		status = cfg_set_dev_object(dev_node_obj, (u32) hdev_obj);
		if (DSP_FAILED(status)) {
		if (status) {
			/* Clean up */
			dev_destroy_device(hdev_obj);
			hdev_obj = NULL;
@@ -895,7 +893,7 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
		/* Create the Manager Object */
		status = mgr_create(&hmgr_obj, dev_node_obj);
	}
	if (DSP_FAILED(status)) {
	if (status) {
		if (hdev_obj)
			dev_destroy_device(hdev_obj);

Loading