public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Ameya Palande <ameya.palande@nokia.com>,
	Hiroshi Doyu <Hiroshi.DOYU@nokia.com>,
	Felipe Contreras <felipe.contreras@nokia.com>,
	Nishanth Menon <nm@ti.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: [PATCH 17/18] DSPBRIDGE: change critical error statements to pr_err in pmgr
Date: Tue, 16 Feb 2010 02:42:27 -0600	[thread overview]
Message-ID: <1266309748-11714-18-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1266309748-11714-17-git-send-email-omar.ramirez@ti.com>

Print to console:
    - DMM table creation fails.
    - Failure while finding dsp code.
    - Failure on device create

This will help to quick diagnose most common bridge errors.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/pmgr/cod.c |   14 ++++++--------
 drivers/dsp/bridge/pmgr/dev.c |    5 ++---
 drivers/dsp/bridge/pmgr/dmm.c |    8 ++++----
 3 files changed, 12 insertions(+), 15 deletions(-)

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;
 }
-- 
1.6.2.4


  reply	other threads:[~2010-02-16  8:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16  8:42 [PATCH 00/18] Custom debug cleanup Omar Ramirez Luna
2010-02-16  8:42 ` [PATCH 01/18] DSPBRIDGE: Remove entry point custom debug statements for rmgr Omar Ramirez Luna
2010-02-16  8:42   ` [PATCH 02/18] DSPBRIDGE: Remove entry point custom debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42     ` [PATCH 03/18] DSPBRIDGE: Remove entry point custom debug statements for pmgr Omar Ramirez Luna
2010-02-16  8:42       ` [PATCH 04/18] DSPBRIDGE: Remove entry point custom debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42         ` [PATCH 05/18] DSPBRIDGE: Remove debug statements for success in rmgr Omar Ramirez Luna
2010-02-16  8:42           ` [PATCH 06/18] DSPBRIDGE: Remove debug statements for success in wmd Omar Ramirez Luna
2010-02-16  8:42             ` [PATCH 07/18] DSPBRIDGE: Remove debug statements for success in pmgr Omar Ramirez Luna
2010-02-16  8:42               ` [PATCH 08/18] DSPBRIDGE: Remove debug statements for success in services Omar Ramirez Luna
2010-02-16  8:42                 ` [PATCH 09/18] DSPBRIDGE: Remove excessive debug statements for rmgr Omar Ramirez Luna
2010-02-16  8:42                   ` [PATCH 10/18] DSPBRIDGE: Remove excessive debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42                     ` [PATCH 11/18] DSPBRIDGE: Remove excessive debug statements for pmgr Omar Ramirez Luna
2010-02-16  8:42                       ` [PATCH 12/18] DSPBRIDGE: Remove excessive debug statements for services Omar Ramirez Luna
2010-02-16  8:42                         ` [PATCH 13/18] DSPBRIDGE: change init statements to pr_info in rmgr Omar Ramirez Luna
2010-02-16  8:42                           ` [PATCH 14/18] DSPBRIDGE: change critical error statements to pr_err " Omar Ramirez Luna
2010-02-16  8:42                             ` [PATCH 15/18] DSPBRIDGE: change critical error statements to pr_err in wmd Omar Ramirez Luna
2010-02-16  8:42                               ` [PATCH 16/18] DSPBRIDGE: print dsp trace buffer by default Omar Ramirez Luna
2010-02-16  8:42                                 ` Omar Ramirez Luna [this message]
2010-02-16  8:42                                   ` [PATCH 18/18] DSPBRIDGE: change critical error statements to pr_err in services Omar Ramirez Luna
2010-02-23 17:53 ` [PATCH 00/18] Custom debug cleanup Omar Ramirez Luna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1266309748-11714-18-git-send-email-omar.ramirez@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox