[PATCH v6 1/3] staging: mt7621-mmc: Delete N_MSG() and all its users

2018-08-31 Thread Nishad Kamdar
This patch removes N_MSG() and all its users since it is a no-op.

Signed-off-by: Nishad Kamdar 
---
Changes in v6:
  - Delete N_MSG() and all its users.
Changes in v5:
  - Remove commented code for N_MSG()
---
 drivers/staging/mt7621-mmc/dbg.h |  10 --
 drivers/staging/mt7621-mmc/sd.c  | 242 ---
 2 files changed, 252 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
index 4d4898a3ab54..9152db30a2ed 100644
--- a/drivers/staging/mt7621-mmc/dbg.h
+++ b/drivers/staging/mt7621-mmc/dbg.h
@@ -102,16 +102,6 @@ do { \
 } while (0)
 #endif /* end of +++ */
 
-#define N_MSG(evt, fmt, args...)
-/*
-do {\
-if ((DBG_EVT_##evt) & sd_debug_zone[host->id]) { \
-printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
-host->id,  ##args , __FUNCTION__, __LINE__, current->comm, 
current->pid);  \
-} \
-} while(0)
-*/
-
 #define ERR_MSG(fmt, args...) \
 do { \
printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 4cd4df4fc75f..0154117fae15 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -230,144 +230,6 @@ static unsigned int msdc_do_command(struct msdc_host   
*host,
 
 static int msdc_tune_cmdrsp(struct msdc_host *host, struct mmc_command *cmd);
 
-#ifdef MT6575_SD_DEBUG
-static void msdc_dump_card_status(struct msdc_host *host, u32 status)
-{
-/* N_MSG is currently a no-op */
-#if 0
-   static char *state[] = {
-   "Idle", /* 0 */
-   "Ready",/* 1 */
-   "Ident",/* 2 */
-   "Stby", /* 3 */
-   "Tran", /* 4 */
-   "Data", /* 5 */
-   "Rcv",  /* 6 */
-   "Prg",  /* 7 */
-   "Dis",  /* 8 */
-   "Reserved", /* 9 */
-   "Reserved", /* 10 */
-   "Reserved", /* 11 */
-   "Reserved", /* 12 */
-   "Reserved", /* 13 */
-   "Reserved", /* 14 */
-   "I/O mode", /* 15 */
-   };
-#endif
-   if (status & R1_OUT_OF_RANGE)
-   N_MSG(RSP, "[CARD_STATUS] Out of Range");
-   if (status & R1_ADDRESS_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Address Error");
-   if (status & R1_BLOCK_LEN_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Block Len Error");
-   if (status & R1_ERASE_SEQ_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Erase Seq Error");
-   if (status & R1_ERASE_PARAM)
-   N_MSG(RSP, "[CARD_STATUS] Erase Param");
-   if (status & R1_WP_VIOLATION)
-   N_MSG(RSP, "[CARD_STATUS] WP Violation");
-   if (status & R1_CARD_IS_LOCKED)
-   N_MSG(RSP, "[CARD_STATUS] Card is Locked");
-   if (status & R1_LOCK_UNLOCK_FAILED)
-   N_MSG(RSP, "[CARD_STATUS] Lock/Unlock Failed");
-   if (status & R1_COM_CRC_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Command CRC Error");
-   if (status & R1_ILLEGAL_COMMAND)
-   N_MSG(RSP, "[CARD_STATUS] Illegal Command");
-   if (status & R1_CARD_ECC_FAILED)
-   N_MSG(RSP, "[CARD_STATUS] Card ECC Failed");
-   if (status & R1_CC_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] CC Error");
-   if (status & R1_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Error");
-   if (status & R1_UNDERRUN)
-   N_MSG(RSP, "[CARD_STATUS] Underrun");
-   if (status & R1_OVERRUN)
-   N_MSG(RSP, "[CARD_STATUS] Overrun");
-   if (status & R1_CID_CSD_OVERWRITE)
-   N_MSG(RSP, "[CARD_STATUS] CID/CSD Overwrite");
-   if (status & R1_WP_ERASE_SKIP)
-   N_MSG(RSP, "[CARD_STATUS] WP Eraser Skip");
-   if (status & R1_CARD_ECC_DISABLED)
-   N_MSG(RSP, "[CARD_STATUS] Card ECC Disabled");
-   if (status & R1_ERASE_RESET)
-   N_MSG(RSP, "[CARD_STATUS] Erase Reset");
-   if (status & R1_READY_FOR_DATA)
-   N_MSG(RSP, "[CARD_STATUS] Ready for Data");
-   if (status & R1_SWITCH_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Switch error");
-   if (status & R1_APP_CMD)
-   N_MSG(RSP, "[CARD_STATUS] App Command");
-
-   N_MSG(RSP, "[CARD_STATUS] '%s' State", state[R1_CURRENT_STATE(status)]);
-}
-
-static void msdc_dump_ocr_reg(struct msdc_host *host, u32 resp)
-{
-   if (resp & (1 << 7))
-   N_MSG(RSP, "[OCR] Low Voltage Range");
-   if (resp & (1 << 15))
-   N_MSG(RSP, "[OCR] 2.7-2.8 volt");
-   if (resp & (1 << 16))
-   N_MSG(RSP, "[OCR] 2.8-2.9 volt");
-   if (resp & (1 << 17))
-   N_MSG(RSP, "[OCR] 2.9-3.0 volt");
-   

[PATCH v6 1/3] staging: mt7621-mmc: Delete N_MSG() and all its users

2018-08-31 Thread Nishad Kamdar
This patch removes N_MSG() and all its users since it is a no-op.

Signed-off-by: Nishad Kamdar 
---
Changes in v6:
  - Delete N_MSG() and all its users.
Changes in v5:
  - Remove commented code for N_MSG()
---
 drivers/staging/mt7621-mmc/dbg.h |  10 --
 drivers/staging/mt7621-mmc/sd.c  | 242 ---
 2 files changed, 252 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
index 4d4898a3ab54..9152db30a2ed 100644
--- a/drivers/staging/mt7621-mmc/dbg.h
+++ b/drivers/staging/mt7621-mmc/dbg.h
@@ -102,16 +102,6 @@ do { \
 } while (0)
 #endif /* end of +++ */
 
-#define N_MSG(evt, fmt, args...)
-/*
-do {\
-if ((DBG_EVT_##evt) & sd_debug_zone[host->id]) { \
-printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
-host->id,  ##args , __FUNCTION__, __LINE__, current->comm, 
current->pid);  \
-} \
-} while(0)
-*/
-
 #define ERR_MSG(fmt, args...) \
 do { \
printk(KERN_ERR TAG"%d -> "fmt" <- %s() : L<%d> PID<%s><0x%x>\n", \
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 4cd4df4fc75f..0154117fae15 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -230,144 +230,6 @@ static unsigned int msdc_do_command(struct msdc_host   
*host,
 
 static int msdc_tune_cmdrsp(struct msdc_host *host, struct mmc_command *cmd);
 
-#ifdef MT6575_SD_DEBUG
-static void msdc_dump_card_status(struct msdc_host *host, u32 status)
-{
-/* N_MSG is currently a no-op */
-#if 0
-   static char *state[] = {
-   "Idle", /* 0 */
-   "Ready",/* 1 */
-   "Ident",/* 2 */
-   "Stby", /* 3 */
-   "Tran", /* 4 */
-   "Data", /* 5 */
-   "Rcv",  /* 6 */
-   "Prg",  /* 7 */
-   "Dis",  /* 8 */
-   "Reserved", /* 9 */
-   "Reserved", /* 10 */
-   "Reserved", /* 11 */
-   "Reserved", /* 12 */
-   "Reserved", /* 13 */
-   "Reserved", /* 14 */
-   "I/O mode", /* 15 */
-   };
-#endif
-   if (status & R1_OUT_OF_RANGE)
-   N_MSG(RSP, "[CARD_STATUS] Out of Range");
-   if (status & R1_ADDRESS_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Address Error");
-   if (status & R1_BLOCK_LEN_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Block Len Error");
-   if (status & R1_ERASE_SEQ_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Erase Seq Error");
-   if (status & R1_ERASE_PARAM)
-   N_MSG(RSP, "[CARD_STATUS] Erase Param");
-   if (status & R1_WP_VIOLATION)
-   N_MSG(RSP, "[CARD_STATUS] WP Violation");
-   if (status & R1_CARD_IS_LOCKED)
-   N_MSG(RSP, "[CARD_STATUS] Card is Locked");
-   if (status & R1_LOCK_UNLOCK_FAILED)
-   N_MSG(RSP, "[CARD_STATUS] Lock/Unlock Failed");
-   if (status & R1_COM_CRC_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Command CRC Error");
-   if (status & R1_ILLEGAL_COMMAND)
-   N_MSG(RSP, "[CARD_STATUS] Illegal Command");
-   if (status & R1_CARD_ECC_FAILED)
-   N_MSG(RSP, "[CARD_STATUS] Card ECC Failed");
-   if (status & R1_CC_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] CC Error");
-   if (status & R1_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Error");
-   if (status & R1_UNDERRUN)
-   N_MSG(RSP, "[CARD_STATUS] Underrun");
-   if (status & R1_OVERRUN)
-   N_MSG(RSP, "[CARD_STATUS] Overrun");
-   if (status & R1_CID_CSD_OVERWRITE)
-   N_MSG(RSP, "[CARD_STATUS] CID/CSD Overwrite");
-   if (status & R1_WP_ERASE_SKIP)
-   N_MSG(RSP, "[CARD_STATUS] WP Eraser Skip");
-   if (status & R1_CARD_ECC_DISABLED)
-   N_MSG(RSP, "[CARD_STATUS] Card ECC Disabled");
-   if (status & R1_ERASE_RESET)
-   N_MSG(RSP, "[CARD_STATUS] Erase Reset");
-   if (status & R1_READY_FOR_DATA)
-   N_MSG(RSP, "[CARD_STATUS] Ready for Data");
-   if (status & R1_SWITCH_ERROR)
-   N_MSG(RSP, "[CARD_STATUS] Switch error");
-   if (status & R1_APP_CMD)
-   N_MSG(RSP, "[CARD_STATUS] App Command");
-
-   N_MSG(RSP, "[CARD_STATUS] '%s' State", state[R1_CURRENT_STATE(status)]);
-}
-
-static void msdc_dump_ocr_reg(struct msdc_host *host, u32 resp)
-{
-   if (resp & (1 << 7))
-   N_MSG(RSP, "[OCR] Low Voltage Range");
-   if (resp & (1 << 15))
-   N_MSG(RSP, "[OCR] 2.7-2.8 volt");
-   if (resp & (1 << 16))
-   N_MSG(RSP, "[OCR] 2.8-2.9 volt");
-   if (resp & (1 << 17))
-   N_MSG(RSP, "[OCR] 2.9-3.0 volt");
-