Skip to contentSkip to conversation

drivers/net/ne3210.c: cleanups

PATCH In review Adrian Bunk 2 participants 5 messages Feb 18, 2005 – Feb 25, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/net/ne3210.c: cleanups

This patch contains the following cleanups:
- make two needlessly global functions static
- kill an ancient version variable

---

 drivers/net/ne3210.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +2 -8
@@ -26,9 +26,6 @@
 	Updated to EISA probing API 5/2003 by Marc Zyngier.
 */
 
-static const char *version =
-	"ne3210.c: Driver revision v0.03, 30/09/98\n";
-
 #include <linux/module.h>
 #include <linux/eisa.h>
 #include <linux/kernel.h>
@@ -196,9 +193,6 @@
 	ei_status.word16 = 1;
 	ei_status.priv = phys_mem;
 
-	if (ei_debug > 0)
-		printk(version);
-
 	ei_status.reset_8390 = &ne3210_reset_8390;
 	ei_status.block_input = &ne3210_block_input;
 	ei_status.block_output = &ne3210_block_output;
@@ -359,12 +353,12 @@
 MODULE_DESCRIPTION("NE3210 EISA Ethernet driver");
 MODULE_LICENSE("GPL");
 
-int ne3210_init(void)
+static int ne3210_init(void)
 {
 	return eisa_driver_register (&ne3210_eisa_driver);
 }
 
-void ne3210_cleanup(void)
+static void ne3210_cleanup(void)
 {
 	eisa_driver_unregister (&ne3210_eisa_driver);
 }
#1 lore raw

drivers/net/ne3210.c line 200

Quoted 2 lines · Adrian Bunk
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +0 -2
-	if (ei_debug > 0)
-		printk(version);

I agree the version variable is outdated, but I disagree that the driver intro banner should be removed completely.

Jeff

#2 lore raw

PATCH 1/1 drivers/net/ne3210.c: cleanups

Quoted 7 lines · Jeff Garzik

Review

Quoted 2 lines · Adrian Bunk
(quoted diff) +0 -2
-	if (ei_debug > 0)
-		printk(version);

I agree the version variable is outdated, but I disagree that the driver intro banner should be removed completely.

A few lines above, the driver already prints "ne3210.c: remapped...". So what exactly should be printed at this place?
The patch below only removes the version information, but the printk looks a bit silly.

<-- snip -->

This patch contains the following cleanups:
- make two needlessly global functions static
- kill an ancient version variable

---

 drivers/net/ne3210.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +3 -6
@@ -26,9 +26,6 @@
 	Updated to EISA probing API 5/2003 by Marc Zyngier.
 */
 
-static const char *version =
-	"ne3210.c: Driver revision v0.03, 30/09/98\n";
-
 #include <linux/module.h>
 #include <linux/eisa.h>
 #include <linux/kernel.h>
@@ -197,7 +194,7 @@
 	ei_status.priv = phys_mem;
 
 	if (ei_debug > 0)
-		printk(version);
+		printk("ne3210 driver");
 
 	ei_status.reset_8390 = &ne3210_reset_8390;
 	ei_status.block_input = &ne3210_block_input;
@@ -359,12 +356,12 @@
 MODULE_DESCRIPTION("NE3210 EISA Ethernet driver");
 MODULE_LICENSE("GPL");
 
-int ne3210_init(void)
+static int ne3210_init(void)
 {
 	return eisa_driver_register (&ne3210_eisa_driver);
 }
 
-void ne3210_cleanup(void)
+static void ne3210_cleanup(void)
 {
 	eisa_driver_unregister (&ne3210_eisa_driver);
 }
#3 lore raw

drivers/net/ne3210.c line 197

Quoted 6 lines · Adrian Bunk
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +1 -1
@@ -197,7 +194,7 @@
 	ei_status.priv = phys_mem;
 
 	if (ei_debug > 0)
-		printk(version);
+		printk("ne3210 driver");

missing newline. Do something like "ns3210 __DATE__ loaded.\n"

Ditto for seeq8002.

Jeff

#4 lore raw
Quoted 4 lines · Jeff Garzik
Quoted 3 lines · Adrian Bunk
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +0 -0
@@ -197,7 +194,7 @@
 	ei_status.priv = phys_mem;
 
Quoted 8 lines

drivers/net/ne3210.c line 197

Quoted 3 lines
drivers/net/ne3210.c renamed from drivers/net/ne3210.c.old +1 -1
 	if (ei_debug > 0)
-		printk(version);
+		printk("ne3210 driver");

missing newline. Do something like "ns3210 __DATE__ loaded.\n"

Ditto for seeq8002.

Sorry for the missing newline.

I have to admit I still don't see why these printk's have to stay:
In both files, there are other printk's nearby that print the name of the driver.

__DATE__ doesn't provide any information that wasn't already available in the first line of the dmesg output.

Quoted 1 line

Jeff

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed