All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net
@ 2005-12-18 22:53 Eric Sesterhenn / snakebyte
  2005-12-18 23:24 ` Adrian Bunk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2005-12-18 22:53 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

hi,

this removes LINUX_VERSION_CODE checks in irda/vlsi_ir.h

Signed-of-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h.orig	2005-12-18 23:45:15.000000000 +0100
+++ linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h	2005-12-18 23:46:10.000000000 +0100
@@ -54,26 +54,9 @@ typedef void irqreturn_t;
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-/* PDE() introduced in 2.5.4 */
-#ifdef CONFIG_PROC_FS
-#define PDE(inode) ((inode)->u.generic_ip)
-#endif
-
-/* irda crc16 calculation exported in 2.5.42 */
-#define irda_calc_crc16(fcs,buf,len)	(GOOD_FCS)
-
-/* we use this for unified pci device name access */
-#define PCIDEV_NAME(pdev)	((pdev)->name)
-
-#else /* 2.5 or later */
-
 /* whatever we get from the associated struct device - bus:slot:dev.fn id */
 #define PCIDEV_NAME(pdev)	(pci_name(pdev))
 
-#endif
-
 /* ================================================================ */
 
 /* non-standard PCI registers */



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net
  2005-12-18 22:53 [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net Eric Sesterhenn / snakebyte
@ 2005-12-18 23:24 ` Adrian Bunk
  2005-12-19  0:24 ` Eric Sesterhenn / snakebyte
  2005-12-19 16:46 ` Eric Sesterhenn / snakebyte
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2005-12-18 23:24 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

On Sun, Dec 18, 2005 at 11:53:51PM +0100, Eric Sesterhenn / snakebyte wrote:
> hi,
> 
> this removes LINUX_VERSION_CODE checks in irda/vlsi_ir.h
> 
> Signed-of-by: Eric Sesterhenn <snakebyte@gmx.de>
> 
> --- linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h.orig	2005-12-18 23:45:15.000000000 +0100
> +++ linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h	2005-12-18 23:46:10.000000000 +0100
> @@ -54,26 +54,9 @@ typedef void irqreturn_t;
>   */
>  #include <linux/version.h>
>  
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
> -
> -/* PDE() introduced in 2.5.4 */
> -#ifdef CONFIG_PROC_FS
> -#define PDE(inode) ((inode)->u.generic_ip)
> -#endif
> -
> -/* irda crc16 calculation exported in 2.5.42 */
> -#define irda_calc_crc16(fcs,buf,len)	(GOOD_FCS)
> -
> -/* we use this for unified pci device name access */
> -#define PCIDEV_NAME(pdev)	((pdev)->name)
> -
> -#else /* 2.5 or later */
> -
>  /* whatever we get from the associated struct device - bus:slot:dev.fn id */
>  #define PCIDEV_NAME(pdev)	(pci_name(pdev))
>  
> -#endif
>...

In this case, you could make the code more readable by expanding all 
uses of PCIDEV_NAME in vlsi_ir.c.

And the "#ifndef IRQ_RETVAL" block in vlsi_ir.h is also kernel 2.4 
compatibility stuff.

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


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net
  2005-12-18 22:53 [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net Eric Sesterhenn / snakebyte
  2005-12-18 23:24 ` Adrian Bunk
@ 2005-12-19  0:24 ` Eric Sesterhenn / snakebyte
  2005-12-19 16:46 ` Eric Sesterhenn / snakebyte
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2005-12-19  0:24 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

hi,

> In this case, you could make the code more readable by expanding all 
> uses of PCIDEV_NAME in vlsi_ir.c.

attached is an updated patch for vlsi_ir.h which also removes
the PCIDE_NAME macro, i will reply to this mail with a patch to change
the vlsi_ir.c 

> And the "#ifndef IRQ_RETVAL" block in vlsi_ir.h is also kernel 2.4 
> compatibility stuff.

can you give me some more information on this? Seems quite some
irda drivers use the IRQ_NONE an friends macro.


Signed-of-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h.orig	2005-12-19 01:14:15.000000000 +0100
+++ linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h	2005-12-19 01:18:55.000000000 +0100
@@ -54,26 +54,6 @@ typedef void irqreturn_t;
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-/* PDE() introduced in 2.5.4 */
-#ifdef CONFIG_PROC_FS
-#define PDE(inode) ((inode)->u.generic_ip)
-#endif
-
-/* irda crc16 calculation exported in 2.5.42 */
-#define irda_calc_crc16(fcs,buf,len)	(GOOD_FCS)
-
-/* we use this for unified pci device name access */
-#define PCIDEV_NAME(pdev)	((pdev)->name)
-
-#else /* 2.5 or later */
-
-/* whatever we get from the associated struct device - bus:slot:dev.fn id */
-#define PCIDEV_NAME(pdev)	(pci_name(pdev))
-
-#endif
-
 /* ================================================================ */
 
 /* non-standard PCI registers */



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net
  2005-12-18 22:53 [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net Eric Sesterhenn / snakebyte
  2005-12-18 23:24 ` Adrian Bunk
  2005-12-19  0:24 ` Eric Sesterhenn / snakebyte
@ 2005-12-19 16:46 ` Eric Sesterhenn / snakebyte
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2005-12-19 16:46 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

hi,

> can you give me some more information on this? Seems quite some
> irda drivers use the IRQ_NONE an friends macro.

Ah ok, seems it is already defined in include/linux/interrupt.h
so we dont need to define it in the driver. Here is a patch on
top of the other which simply removes it.

Signed-of-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h.orig	2005-12-19 17:44:31.000000000 +0100
+++ linux-2.6.15-rc5-git5/drivers/net/irda/vlsi_ir.h	2005-12-19 17:44:54.000000000 +0100
@@ -41,14 +41,6 @@
 #define PCI_CLASS_SUBCLASS_MASK		0xffff
 #endif
 
-/* in recent 2.5 interrupt handlers have non-void return value */
-#ifndef IRQ_RETVAL
-typedef void irqreturn_t;
-#define IRQ_NONE
-#define IRQ_HANDLED
-#define IRQ_RETVAL(x)
-#endif
-
 /* some stuff need to check kernelversion. Not all 2.5 stuff was present
  * in early 2.5.x - the test is merely to separate 2.4 from 2.5
  */



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2005-12-19 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-18 22:53 [KJ] [Patch 2/5] Cleanup LINUX_VERSION_CODE in drivers/net Eric Sesterhenn / snakebyte
2005-12-18 23:24 ` Adrian Bunk
2005-12-19  0:24 ` Eric Sesterhenn / snakebyte
2005-12-19 16:46 ` Eric Sesterhenn / snakebyte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.