[RFC] [PATCH 7/13] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDPOINTER -> -EFAULT)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From d7646f5d1aff38453705586e256bc12a2cfd289a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar <x0hebbar@xxxxxx>
Date: Fri, 9 Apr 2010 11:23:35 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDPOINTER -> -EFAULT)

This patch replaces CFG_E_INVALIDPOINTER with -EFAULT.

Signed-off-by: Shivananda Hebbar <x0hebbar@xxxxxx>
---
 arch/arm/plat-omap/include/dspbridge/cfg.h     |    8 ++++----
 arch/arm/plat-omap/include/dspbridge/errbase.h |    3 ---
 drivers/dsp/bridge/services/cfg.c              |    8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 9a9ab8e..faeb87c 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -83,7 +83,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *  Returns:
  *      DSP_SOK:                Success.
  *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
- *      CFG_E_INVALIDPOINTER:   phDevObject is invalid.
+ *      -EFAULT:   phDevObject is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *      CFG initialized.
@@ -126,7 +126,7 @@ extern dsp_status cfg_get_dsp_resources(IN struct cfg_devnode *dev_node_obj,
  *  Returns:
  *      DSP_SOK:                Success.
  *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
- *      CFG_E_INVALIDPOINTER:   pstrExecFile is invalid.
+ *      -EFAULT:   pstrExecFile is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *      CFG initialized.
@@ -147,7 +147,7 @@ extern dsp_status cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
  *      pHostResTable:  Ptr to a location to store the host resource table.
  *  Returns:
  *      DSP_SOK:                On success.
- *      CFG_E_INVALIDPOINTER:   pHostResTable is invalid.
+ *      -EFAULT:   pHostResTable is invalid.
  *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -226,7 +226,7 @@ extern dsp_status cfg_get_wmd_file_name(IN struct cfg_devnode *dev_node_obj,
  *      pstrZLFileName: Ptr to character buf to hold ZLFileName.
  *  Returns:
  *      DSP_SOK:                Success.
- *      CFG_E_INVALIDPOINTER:   pstrZLFileName is invalid.
+ *      -EFAULT:   pstrZLFileName is invalid.
  *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: couldn't find the ZLFileName.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 06c6030..660deb6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -216,9 +216,6 @@
 /* FAILURE Codes : CFG */
 #define CFG_EBASE                   (DSP_COMP_EBASE + 0x200)
 
-/* Invalid pointer passed into a configuration module function */
-#define CFG_E_INVALIDPOINTER        (CFG_EBASE + 0x00)
-
 /* Invalid device node handle passed into a configuration module function. */
 #define CFG_E_INVALIDHDEVNODE       (CFG_EBASE + 0x01)
 
diff --git a/drivers/dsp/bridge/services/cfg.c b/drivers/dsp/bridge/services/cfg.c
index 36f1a7b..ad02875 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -60,7 +60,7 @@ dsp_status cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
 	if (!dev_node_obj)
 		status = CFG_E_INVALIDHDEVNODE;
 	if (!pdwAutoStart)
-		status = CFG_E_INVALIDPOINTER;
+		status = -EFAULT;
 	if (DSP_SUCCEEDED(status)) {
 		status = reg_get_value(AUTOSTART, (u8 *) pdwAutoStart,
 				       &dw_buf_size);
@@ -122,7 +122,7 @@ dsp_status cfg_get_dsp_resources(struct cfg_devnode *dev_node_obj,
 	if (!dev_node_obj) {
 		status = CFG_E_INVALIDHDEVNODE;
 	} else if (!pDSPResTable) {
-		status = CFG_E_INVALIDPOINTER;
+		status = -EFAULT;
 	} else {
 		status = reg_get_value(DSPRESOURCES, (u8 *) pDSPResTable,
 				       &dw_res_size);
@@ -154,7 +154,7 @@ dsp_status cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
 	if (!dev_node_obj)
 		status = CFG_E_INVALIDHDEVNODE;
 	else if (!pstrExecFile)
-		status = CFG_E_INVALIDPOINTER;
+		status = -EFAULT;
 
 	if (DSP_SUCCEEDED(status)) {
 		status =
@@ -188,7 +188,7 @@ dsp_status cfg_get_host_resources(struct cfg_devnode *dev_node_obj,
 		status = CFG_E_INVALIDHDEVNODE;
 
 	if (!pHostResTable)
-		status = CFG_E_INVALIDPOINTER;
+		status = -EFAULT;
 
 	if (DSP_SUCCEEDED(status)) {
 		dw_buf_size = sizeof(struct cfg_hostres);
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux