public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/mmc/wbsd.c: possible cleanups
@ 2005-05-13  0:47 Adrian Bunk
  2005-05-13  9:31 ` [Wbsd-devel] " Pierre Ossman
  2005-05-13  9:58 ` Russell King
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian Bunk @ 2005-05-13  0:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: drzeus-wbsd, wbsd-devel, linux-kernel

This patch contains the following possible cleanups:
- make some needlessly global code static
- remove the unneeded global function DBG_REG

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 1 May 2005
- 19 Apr 2005

 drivers/mmc/wbsd.c |   30 ++++++++----------------------
 drivers/mmc/wbsd.h |    7 -------
 2 files changed, 8 insertions(+), 29 deletions(-)

--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h.old	2005-04-19 02:56:24.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h	2005-04-19 02:57:17.000000000 +0200
@@ -8,13 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-const int config_ports[] = { 0x2E, 0x4E };
-const int unlock_codes[] = { 0x83, 0x87 };
-
-const int valid_ids[] = {
-	0x7112,
-	};
-
 #define LOCK_CODE		0xAA
 
 #define WBSD_CONF_SWRST		0x02
--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c.old	2005-04-19 02:55:39.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c	2005-04-19 02:57:06.000000000 +0200
@@ -52,32 +52,18 @@
 #define DBGF(x...)	do { } while (0)
 #endif
 
+static const int config_ports[] = { 0x2E, 0x4E };
+static const int unlock_codes[] = { 0x83, 0x87 };
+
+static const int valid_ids[] = {
+	0x7112,
+	};
+
+
 static unsigned int io = 0x248;
 static unsigned int irq = 6;
 static int dma = 2;
 
-#ifdef CONFIG_MMC_DEBUG
-void DBG_REG(int reg, u8 value)
-{
-	int i;
-	
-	printk(KERN_DEBUG "wbsd: Register %d: 0x%02X %3d '%c' ",
-		reg, (int)value, (int)value, (value < 0x20)?'.':value);
-	
-	for (i = 7;i >= 0;i--)
-	{
-		if (value & (1 << i))
-			printk("x");
-		else
-			printk(".");
-	}
-	
-	printk("\n");
-}
-#else
-#define DBG_REG(r, v) do {}  while (0)
-#endif
-
 /*
  * Basic functions
  */


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [2.6 patch] drivers/mmc/wbsd.c: possible cleanups
@ 2005-06-30  0:47 Adrian Bunk
  0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2005-06-30  0:47 UTC (permalink / raw)
  To: drzeus-wbsd, wbsd-devel; +Cc: linux-kernel

This patch contains the following possible cleanups:
- make some needlessly global code static
- remove the unneeded global function DBG_REG

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/mmc/wbsd.c |   29 +++++++----------------------
 drivers/mmc/wbsd.h |    7 -------
 2 files changed, 7 insertions(+), 29 deletions(-)

--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h.old	2005-04-19 02:56:24.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h	2005-04-19 02:57:17.000000000 +0200
@@ -8,13 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-const int config_ports[] = { 0x2E, 0x4E };
-const int unlock_codes[] = { 0x83, 0x87 };
-
-const int valid_ids[] = {
-	0x7112,
-	};
-
 #define LOCK_CODE		0xAA
 
 #define WBSD_CONF_SWRST		0x02
--- linux-2.6.12-mm2-full/drivers/mmc/wbsd.c.old	2005-06-30 02:31:01.000000000 +0200
+++ linux-2.6.12-mm2-full/drivers/mmc/wbsd.c	2005-06-30 02:31:51.000000000 +0200
@@ -54,28 +54,6 @@
 #define DBGF(x...)	do { } while (0)
 #endif
 
-#ifdef CONFIG_MMC_DEBUG
-void DBG_REG(int reg, u8 value)
-{
-	int i;
-	
-	printk(KERN_DEBUG "wbsd: Register %d: 0x%02X %3d '%c' ",
-		reg, (int)value, (int)value, (value < 0x20)?'.':value);
-	
-	for (i = 7;i >= 0;i--)
-	{
-		if (value & (1 << i))
-			printk("x");
-		else
-			printk(".");
-	}
-	
-	printk("\n");
-}
-#else
-#define DBG_REG(r, v) do {}  while (0)
-#endif
-
 /*
  * Device resources
  */
@@ -92,6 +70,13 @@
 
 #endif /* CONFIG_PNP */
 
+static const int config_ports[] = { 0x2E, 0x4E };
+static const int unlock_codes[] = { 0x83, 0x87 };
+
+static const int valid_ids[] = {
+	0x7112,
+	};
+
 #ifdef CONFIG_PNP
 static unsigned int nopnp = 0;
 #else

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [2.6 patch] drivers/mmc/wbsd.c: possible cleanups
@ 2005-05-01 15:43 Adrian Bunk
  0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2005-05-01 15:43 UTC (permalink / raw)
  To: drzeus-wbsd; +Cc: wbsd-devel, linux-kernel

This patch contains the following possible cleanups:
- make some needlessly global code static
- remove the unneeded global function DBG_REG

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 19 Apr 2005

 drivers/mmc/wbsd.c |   30 ++++++++----------------------
 drivers/mmc/wbsd.h |    7 -------
 2 files changed, 8 insertions(+), 29 deletions(-)

--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h.old	2005-04-19 02:56:24.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h	2005-04-19 02:57:17.000000000 +0200
@@ -8,13 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-const int config_ports[] = { 0x2E, 0x4E };
-const int unlock_codes[] = { 0x83, 0x87 };
-
-const int valid_ids[] = {
-	0x7112,
-	};
-
 #define LOCK_CODE		0xAA
 
 #define WBSD_CONF_SWRST		0x02
--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c.old	2005-04-19 02:55:39.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c	2005-04-19 02:57:06.000000000 +0200
@@ -52,32 +52,18 @@
 #define DBGF(x...)	do { } while (0)
 #endif
 
+static const int config_ports[] = { 0x2E, 0x4E };
+static const int unlock_codes[] = { 0x83, 0x87 };
+
+static const int valid_ids[] = {
+	0x7112,
+	};
+
+
 static unsigned int io = 0x248;
 static unsigned int irq = 6;
 static int dma = 2;
 
-#ifdef CONFIG_MMC_DEBUG
-void DBG_REG(int reg, u8 value)
-{
-	int i;
-	
-	printk(KERN_DEBUG "wbsd: Register %d: 0x%02X %3d '%c' ",
-		reg, (int)value, (int)value, (value < 0x20)?'.':value);
-	
-	for (i = 7;i >= 0;i--)
-	{
-		if (value & (1 << i))
-			printk("x");
-		else
-			printk(".");
-	}
-	
-	printk("\n");
-}
-#else
-#define DBG_REG(r, v) do {}  while (0)
-#endif
-
 /*
  * Basic functions
  */


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [2.6 patch] drivers/mmc/wbsd.c: possible cleanups
@ 2005-04-19  2:43 Adrian Bunk
  2005-04-19  7:19 ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-04-19  2:43 UTC (permalink / raw)
  To: drzeus-wbsd; +Cc: wbsd-devel, linux-kernel

This patch contains the following possible cleanups:
- make some needlessly global code static
- remove the unneeded global function DBG_REG

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/mmc/wbsd.c |   30 ++++++++----------------------
 drivers/mmc/wbsd.h |    7 -------
 2 files changed, 8 insertions(+), 29 deletions(-)

--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h.old	2005-04-19 02:56:24.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.h	2005-04-19 02:57:17.000000000 +0200
@@ -8,13 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-const int config_ports[] = { 0x2E, 0x4E };
-const int unlock_codes[] = { 0x83, 0x87 };
-
-const int valid_ids[] = {
-	0x7112,
-	};
-
 #define LOCK_CODE		0xAA
 
 #define WBSD_CONF_SWRST		0x02
--- linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c.old	2005-04-19 02:55:39.000000000 +0200
+++ linux-2.6.12-rc2-mm3-full/drivers/mmc/wbsd.c	2005-04-19 02:57:06.000000000 +0200
@@ -52,32 +52,18 @@
 #define DBGF(x...)	do { } while (0)
 #endif
 
+static const int config_ports[] = { 0x2E, 0x4E };
+static const int unlock_codes[] = { 0x83, 0x87 };
+
+static const int valid_ids[] = {
+	0x7112,
+	};
+
+
 static unsigned int io = 0x248;
 static unsigned int irq = 6;
 static int dma = 2;
 
-#ifdef CONFIG_MMC_DEBUG
-void DBG_REG(int reg, u8 value)
-{
-	int i;
-	
-	printk(KERN_DEBUG "wbsd: Register %d: 0x%02X %3d '%c' ",
-		reg, (int)value, (int)value, (value < 0x20)?'.':value);
-	
-	for (i = 7;i >= 0;i--)
-	{
-		if (value & (1 << i))
-			printk("x");
-		else
-			printk(".");
-	}
-	
-	printk("\n");
-}
-#else
-#define DBG_REG(r, v) do {}  while (0)
-#endif
-
 /*
  * Basic functions
  */


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-30  0:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-13  0:47 [2.6 patch] drivers/mmc/wbsd.c: possible cleanups Adrian Bunk
2005-05-13  9:31 ` [Wbsd-devel] " Pierre Ossman
2005-05-13  9:58 ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2005-06-30  0:47 Adrian Bunk
2005-05-01 15:43 Adrian Bunk
2005-04-19  2:43 Adrian Bunk
2005-04-19  7:19 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox