diff mbox

[17/18] DSPBRIDGE: change critical error statements to pr_err in pmgr

Message ID 1266309748-11714-18-git-send-email-omar.ramirez@ti.com (mailing list archive)
State Accepted
Delegated to:
Headers show

Commit Message

omar ramirez Feb. 16, 2010, 8:42 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index eb74fb8..541503c 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -574,10 +574,6 @@  DSP_STATUS COD_Open(struct COD_MANAGER *hMgr, IN char *pszCoffPath,
 	DBC_Require(flags == COD_NOLOAD || flags == COD_SYMB);
 	DBC_Require(pLib != NULL);
 
-	GT_4trace(COD_debugMask, GT_ENTER, "Entered COD_Open, hMgr: 0x%x\n\t "
-		  "pszCoffPath:  0x%x\tflags: 0x%x\tlib: 0x%x\n", hMgr,
-		  pszCoffPath, flags, pLib);
-
 	*pLib = NULL;
 
 	lib = MEM_Calloc(sizeof(struct COD_LIBRARYOBJ), MEM_NONPAGED);
@@ -592,6 +588,9 @@  DSP_STATUS COD_Open(struct COD_MANAGER *hMgr, IN char *pszCoffPath,
 			*pLib = lib;
 	}
 
+	if (DSP_FAILED(status))
+		pr_err("%s: error status 0x%x, pszCoffPath: %s flags: 0x%x\n",
+					__func__, status, pszCoffPath, flags);
 	return status;
 }
 
@@ -610,10 +609,6 @@  DSP_STATUS COD_OpenBase(struct COD_MANAGER *hMgr, IN char *pszCoffPath,
 	DBC_Require(IsValid(hMgr));
 	DBC_Require(pszCoffPath != NULL);
 
-	GT_2trace(COD_debugMask, GT_ENTER,
-		  "Entered COD_OpenBase, hMgr:  0x%x\n\t"
-		  "pszCoffPath:  0x%x\n", hMgr, pszCoffPath);
-
 	/* if we previously opened a base image, close it now */
 	if (hMgr->baseLib) {
 		if (hMgr->fLoaded) {
@@ -631,6 +626,9 @@  DSP_STATUS COD_OpenBase(struct COD_MANAGER *hMgr, IN char *pszCoffPath,
 		hMgr->szZLFile[COD_MAXPATHLENGTH - 1] = '\0';
 	}
 
+	if (DSP_FAILED(status))
+		pr_err("%s: error status 0x%x pszCoffPath: %s\n", __func__,
+							status, pszCoffPath);
 	return status;
 }
 
diff --git a/drivers/dsp/bridge/pmgr/dev.c b/drivers/dsp/bridge/pmgr/dev.c
index 8ee6d69..e4450bc 100644
--- a/drivers/dsp/bridge/pmgr/dev.c
+++ b/drivers/dsp/bridge/pmgr/dev.c
@@ -215,9 +215,8 @@  DSP_STATUS DEV_CreateDevice(OUT struct DEV_OBJECT **phDevObject,
 		} else {
 			ioMgrAttrs.dwSMBase = 0;
 			ioMgrAttrs.uSMLength = 0;
-			GT_0trace(debugMask, GT_7CLASS,
-				  "**There is no memory reserved for "
-				  "shared structures**\n");
+			pr_err("%s: No memory reserved for shared structures\n",
+								__func__);
 		}
 		status = CHNL_Create(&pDevObject->hChnlMgr, pDevObject,
 				    &mgrAttrs);
diff --git a/drivers/dsp/bridge/pmgr/dmm.c b/drivers/dsp/bridge/pmgr/dmm.c
index ebecc8b..2840674 100644
--- a/drivers/dsp/bridge/pmgr/dmm.c
+++ b/drivers/dsp/bridge/pmgr/dmm.c
@@ -120,10 +120,10 @@  DSP_STATUS DMM_CreateTables(struct DMM_OBJECT *hDmmMgr, u32 addr, u32 size)
 			pVirtualMappingTable[0].RegionSize = TableSize;
 		}
 		SYNC_LeaveCS(pDmmObj->hDmmLock);
-	} else
-		GT_0trace(DMM_debugMask, GT_7CLASS,
-			 "DMM_CreateTables: DMM_DeleteTables"
-			 "Failure\n");
+	}
+
+	if (DSP_FAILED(status))
+		pr_err("%s: failure, status 0x%x\n", __func__, status);
 
 	return status;
 }