Skip to contentSkip to conversation

staging: mt7621-mmc: Remove #if 0 blocks and fix macros

PATCH Superseded Nishad Kamdar 1 participant 1 message Sep 28, 2018

Subsystems (2)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 staging: mt7621-mmc: Remove #if 0 blocks and fix macros

This patch removes #if 0 code blocks and usages of the functions defined in the #if 0 code block. It removes the macro msdc_irq_restore() and replaces its usage with call to the function called in the macro definition. Issue found by checkpatch.

---
Changes in v4:
- Removed #if 0 code blocks and usages of functions defined in the #if 0 blocks in dbg.c and dbg.h
Changes in v3:
- Remove the #if 0 code blocks and usages of the functions defined in the #if 0 code block.
- Delete msdc_irq_restore() and replace its usage directly with call to the function being called by the macro.
Changes in v2:
- Convert msdc_gate_clk() and msdc_ungate_clk() to inline functions.
- Delete msdc_irq_restore(), msdc_vcore_on(), msdc_vcore_off(), msdc_vdd_on() and msdc_vdd_off() and replace their usages directly with calls to the function being called by these macros.

---
 drivers/staging/mt7621-mmc/dbg.c |  18 --
 drivers/staging/mt7621-mmc/dbg.h |  14 --
 drivers/staging/mt7621-mmc/sd.c  | 306 +------------------------------
 3 files changed, 2 insertions(+), 336 deletions(-)
drivers/staging/mt7621-mmc/dbg.c +0 -18
index 4fe4d2fd111e..c512cc55be3e 100644
@@ -66,23 +66,6 @@ u32 sdio_pro_enable;   /* make sure gpt is enabled */
 u32 sdio_pro_time;     /* no more than 30s */
 struct sdio_profile sdio_perfomance = {0};
 
-#if 0 /* --- chhung */
-void msdc_init_gpt(void)
-{
-	GPT_CONFIG config;
-
-	config.num  = GPT6;
-	config.mode = GPT_FREE_RUN;
-	config.clkSrc = GPT_CLK_SRC_SYS;
-	config.clkDiv = GPT_CLK_DIV_1;   /* 13MHz GPT6 */
-
-	if (GPT_Config(config) == FALSE)
-		return;
-
-	GPT_Start(GPT6);
-}
-#endif /* end of --- */
-
 u32 msdc_time_calc(u32 old_L32, u32 old_H32, u32 new_L32, u32 new_H32)
 {
 	u32 ret = 0;
@@ -269,7 +252,6 @@ static ssize_t msdc_debug_proc_write(struct file *file,
 	} else if (cmd == SD_TOOL_SDIO_PROFILE) {
 		if (p1 == 1) { /* enable profile */
 			if (gpt_enable == 0) {
-				// msdc_init_gpt(); /* --- by chhung */
 				gpt_enable = 1;
 			}
 			sdio_pro_enable = 1;
drivers/staging/mt7621-mmc/dbg.h +0 -14
index 4ab9f10dccc2..2a044c375910 100644
@@ -91,23 +91,9 @@ enum msdc_dbg {
 
 extern unsigned int sd_debug_zone[4];
 #define TAG "msdc"
-#if 0 /* +++ chhung */
-#define BUG_ON(x) \
-do { \
-	if (x) { \
-		printk("[BUG] %s LINE:%d FILE:%s\n", #x, __LINE__, __FILE__); \
-		while (1)						\
-			;						\
-	} \
-} while (0)
-#endif /* end of +++ */
 
 void msdc_debug_proc_init(void);
 
-#if 0 /* --- chhung */
-void msdc_init_gpt(void);
-extern void GPT_GetCounter64(UINT32 *cntL32, UINT32 *cntH32);
-#endif /* end of --- */
 u32 msdc_time_calc(u32 old_L32, u32 old_H32, u32 new_L32, u32 new_H32);
 void msdc_performance(u32 opcode, u32 sizes, u32 bRx, u32 ticks);
 
drivers/staging/mt7621-mmc/sd.c +2 -304

449 lines not on this page · raw message

Signature · 1 line
2.17.1