Cleanup LINUX_VERSION_CODE in drivers/net
Subsystems (2)
PATCH 1/5 Cleanup LINUX_VERSION_CODE in drivers/net
hi,
this removes LINUX_VERSION_CODE checks in typhoon.c
drivers/net/typhoon.c renamed from drivers/net/typhoon.c.orig +0 -4
@@ -333,11 +333,7 @@ enum state_values {#define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)#define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY) -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,28 ) -#define typhoon_synchronize_irq (x) synchronize_irq() -#else #define typhoon_synchronize_irq (x) synchronize_irq(x) -#endif #if defined(NETIF_F_TSO )#define skb_tso_size (x) (skb_shinfo(x)->tso_size)
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/net/typhoon.c enum state_values { · line 340
Quoted 6 lines · Eric Sesterhenn / snakebyte
this removes
LINUX_VERSION_CODEchecks intyphoon.cdrivers/net/typhoon.c renamed from drivers/net/typhoon.c.orig +0
-4-#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,28 ) -#define typhoon_synchronize_irq (x) synchronize_irq() -#else #define typhoon_synchronize_irq (x) synchronize_irq(x) -#endif
Probably you should remove typhoon_synchronize_irq altogether.
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
hi,
Quoted 1 line
Probably you should remove
typhoon_synchronize_irqaltogether.
updated patch below.
--- linux-2.6.15-rc5-git5/drivers/net/typhoon.c.orig 2005-12-18
23:42:15.000000000 +0100
+++ linux-2.6.15-rc5-git5/drivers/net/typhoon.c 2005-12-19
00:13:32.000000000 +0100
@@ -333,12 +333,6 @@ enum state_values {
#define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)
#define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)
-#define typhoon_synchronize_irq(x) synchronize_irq()
-#else
-#define typhoon_synchronize_irq(x) synchronize_irq(x)
-#endif
-
#if defined(NETIF_F_TSO)
#define skb_tso_size(x) (skb_shinfo(x)->tso_size)
#define TSO_NUM_DESCRIPTORS 2
@@ -2172,7 +2166,7 @@ typhoon_close(struct net_device *dev)
printk(KERN_ERR "%s: unable to stop runtime\n", dev->name);
/* Make sure there is no irq handler running on a different CPU. */
- typhoon_synchronize_irq(dev->irq);
+ synchronize_irq(dev->irq);
free_irq(dev->irq, dev);
typhoon_free_rx_rings(tp);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
sorry for the linebreaks in the patch, here is it
again.
drivers/net/typhoon.c renamed from drivers/net/typhoon.c.orig +1 -7
@@ -333,12 +333,6 @@ enum state_values {#define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)#define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY) -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,28 ) -#define typhoon_synchronize_irq (x) synchronize_irq() -#else -#define typhoon_synchronize_irq (x) synchronize_irq(x) -#endif -#if defined(NETIF_F_TSO )#define skb_tso_size (x) (skb_shinfo(x)->tso_size)#define TSO_NUM_DESCRIPTORS 2
@@ -2172,7 +2166,7 @@ typhoon_close(struct net_device *dev)printk (KERN_ERR "%s: unable to stop runtime\n" , dev->name);/* Make sure there is no irq handler running on a different CPU. */ -typhoon_synchronize_irq (dev->irq); +synchronize_irq (dev->irq);free_irq (dev->irq, dev);typhoon_free_rx_rings (tp);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 9 lines · Eric Sesterhenn / snakebyte
hi,
this removes
LINUX_VERSION_CODEchecks intyphoon.cSigned-of-by Eric Sesterhenn <[email protected]>
drivers/net/typhoon.c enum state_values { · line 340
Quoted 9 lines
drivers/net/typhoon.c renamed from drivers/net/typhoon.c.orig +0
-4@@ -333,11 +333,7 @@ enum state_values {#define TYPHOON_RESET_TIMEOUT_NOSLEEP ((6 * 1000000) / TYPHOON_UDELAY)#define TYPHOON_WAIT_TIMEOUT ((1000000 / 2) / TYPHOON_UDELAY) -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,28 ) -#define typhoon_synchronize_irq (x) synchronize_irq() -#else #define typhoon_synchronize_irq (x) synchronize_irq(x) -#endif
Two comments:
- please Cc subsystem maintainers and driver authors of the code you touch; e.g. sometimes this kind of patches is rejected because the driver maintainer does actually support both kernel 2.4 and 2.6 in one file
- in this case, you should do an s/typhoon_synchronize_irq/synchronize_irq/g throughout the whole file
cu
Adrian
Signature · 4 lines
"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_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
On Mon, Dec 19, 2005 at 12:22:14AM +0100, Adrian Bunk wrote:
<snipp patch>
Quoted 6 lines
Two comments:
- please Cc subsystem maintainers and driver authors of the code you touch; e.g. sometimes this kind of patches is rejected because the driver maintainer does actually support both kernel 2.4 and 2.6 in one file
well it has alway been mandatory for new janitors. please keep the entry bar low.
the kj maintainer takes care of feeding the MAINTAINERS.
sure it often helps for quicker patch flow.
Signature · 1 line
maks
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors