[PATCHv2 5/5] DSPBRIDGE: OSAL: Remove printS()

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

 



From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>

Remove printS() debuggin method. It's mostly useless and at least dangerous
because of absence of boundary check.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
---
 drivers/dsp/bridge/services/regsup.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/dsp/bridge/services/regsup.c b/drivers/dsp/bridge/services/regsup.c
index 71651a8..bd45b56 100644
--- a/drivers/dsp/bridge/services/regsup.c
+++ b/drivers/dsp/bridge/services/regsup.c
@@ -60,26 +60,6 @@ static struct LST_LIST regKey, *pRegKey = &regKey;
 
 #if GT_TRACE
 extern struct GT_Mask REG_debugMask;	/* GT trace var. */
-/*
- *  ======== printS ========
- *  Purpose:
- *      Displays printable characters in pBuf, if any.
- */
-static inline void printS(void *pBuf)
-{
-	int pos = 0;
-	if (*(REG_debugMask).flags & (GT_2CLASS)) {
-		while (*(u8 *)((pBuf)+pos) >= ' ' &&
-		       *(u8 *)((pBuf)+pos) <= '~') {
-			GT_1trace(REG_debugMask, GT_2CLASS, "%c",
-					*(u8 *)((pBuf) + pos++));
-		}
-
-		GT_0trace(REG_debugMask, GT_2CLASS, "\n");
-	}
-}
-#else
-#define printS(pBuf)
 #endif
 
 /*
@@ -140,7 +120,6 @@ DSP_STATUS regsupGetValue(char *valName, void *pBuf, u32 *dataSize)
 	if (DSP_SUCCEEDED(retVal)) {
 		GT_2trace(REG_debugMask, GT_2CLASS, "G %s DATA %x ", valName,
 			  *(u32 *)pBuf);
-		printS((u8 *)pBuf);
 	} else {
 		GT_1trace(REG_debugMask, GT_3CLASS, "G %s FAILED\n", valName);
 	}
@@ -160,7 +139,6 @@ DSP_STATUS regsupSetValue(char *valName, void *pBuf, u32 dataSize)
 
 	GT_2trace(REG_debugMask, GT_2CLASS, "S %s DATA %x ", valName,
 		  *(u32 *)pBuf);
-	printS((u8 *)pBuf);
 
 	/*  Need to search through the entries looking for the right one.  */
 	while (rv) {
@@ -245,7 +223,6 @@ DSP_STATUS regsupEnumValue(IN u32 dwIndex, IN CONST char *pstrKey,
 			GT_3trace(REG_debugMask, GT_2CLASS,
 				  "E Key %s, Value %s, Data %x ",
 				  pstrKey, pstrValue, *(u32 *)pstrData);
-			printS((u8 *)pstrData);
 
 			/*  Set our status to good and exit.  */
 			retVal = DSP_SOK;
-- 
1.5.6.5

--
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