Skip to contentSkip to conversation

drivers/atm/he.c remove dead code

KJ Domen Puncer 3 participants 4 messages Dec 20, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Review static u8 read_prom_byte(struct he_dev * · line 123

Quoted 7 lines · Marcel Sebek
(quoted diff) +1 -2
@@ -147,13 +120,13 @@ static u8 read_prom_byte(struct he_dev *
 
 /* globals */
 
-struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+struct he_dev *he_devs;

This is not static, so it won't be initialized.

Domen

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 11 lines · Domen Puncer

Review static u8 read_prom_byte(struct he_dev * · line 123

Quoted 7 lines · Marcel Sebek
(quoted diff) +1 -2
@@ -147,13 +120,13 @@ static u8 read_prom_byte(struct he_dev *
 
 /* globals */
 
-struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+struct he_dev *he_devs;

This is not static, so it won't be initialized.

Thanks for reply. Corrected version follows.

drivers/atm/he.c +3 -30
diff -urpN linux-2.6/drivers/atm/he.c linux-2.6-new/drivers/atm/he.c
@@ -87,28 +87,6 @@
 #define USE_TPD_POOL
 /* #undef CONFIG_ATM_HE_USE_SUNI */
 
-/* compatibility */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-typedef void irqreturn_t;
-#define IRQ_NONE
-#define IRQ_HANDLED
-#define IRQ_RETVAL(x)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,9)
-#define __devexit_p(func)		func
-#endif
-
-#ifndef MODULE_LICENSE
-#define MODULE_LICENSE(x)
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)
-#define pci_set_drvdata(pci_dev, data)	(pci_dev)->driver_data = (data)
-#define pci_get_drvdata(pci_dev)	(pci_dev)->driver_data
-#endif
-
 #include "he.h"
 
 #include "suni.h"
@@ -117,12 +95,7 @@ typedef void irqreturn_t;
 
 #define hprintk(fmt,args...)	printk(KERN_ERR DEV_LABEL "%d: " fmt, he_dev->number , ##args)
 
-#undef DEBUG
-#ifdef DEBUG
-#define HPRINTK(fmt,args...)	printk(KERN_DEBUG DEV_LABEL "%d: " fmt, he_dev->number , ##args)
-#else
-#define HPRINTK(fmt,args...)	do { } while (0)
-#endif /* DEBUG */
+#define HPRINTK(fmt,args...)	pr_debug(DEV_LABEL "%d: " fmt, he_dev->number , ##args)
 
 
 /* version definition */
@@ -148,12 +121,12 @@ static u8 read_prom_byte(struct he_dev *
 /* globals */
 
 struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+static int disable64;
 static short nvpibits = -1;
 static short nvcibits = -1;
 static short rx_skb_reserve = 16;
 static int irq_coalesce = 1;
-static int sdh = 0;
+static int sdh;
 
 static struct atmdev_ops he_ops =
 {

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Domen Puncer
Quoted 10 lines · Domen Puncer

Review static u8 read_prom_byte(struct he_dev * · line 123

Quoted 7 lines · Marcel Sebek
(quoted diff) +1 -2
@@ -147,13 +120,13 @@ static u8 read_prom_byte(struct he_dev *
 
 /* globals */
 
-struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+struct he_dev *he_devs;

This is not static, so it won't be initialized.

Huh? Since when is that a requirement? No, that will be initialized to NULL.

thanks,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#3 lore raw
In reply to Domen Puncer
Quoted 6 lines · Greg KH
Quoted 5 lines · Domen Puncer
Quoted 4 lines · Marcel Sebek
(quoted diff) +0 -0
@@ -147,13 +120,13 @@ static u8 read_prom_byte(struct he_dev *
 
 /* globals */
 
Quoted 8 lines
Quoted 5 lines

Review static u8 read_prom_byte(struct he_dev * · line 123

Quoted 3 lines
(quoted diff) +1 -2
-struct he_dev *he_devs = NULL;
-static int disable64 = 0;
+struct he_dev *he_devs;

This is not static, so it won't be initialized.

Huh? Since when is that a requirement? No, that will be initialized to NULL.

Right, thank you for correcting me.

Domen

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors