linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h
@ 2002-10-20 12:34 Adrian Bunk
  2002-10-21 17:35 ` Jean Tourrilhes
  2002-10-21 18:34 ` Martin Diehl
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Bunk @ 2002-10-20 12:34 UTC (permalink / raw)
  To: linux-irda, jt, Martin Diehl; +Cc: linux-kernel, trivial


I got the following compile error in 2.5.44:

<--  snip  -->

...
  gcc -Wp,-MD,drivers/net/irda/.vlsi_ir.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
-fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
-Iarch/i386/mach-generic -nostdinc -iwithprefix include    -DKBUILD_BASENAME=vlsi_ir   -c -o
drivers/net/irda/vlsi_ir.o drivers/net/irda/vlsi_ir.c
In file included from drivers/net/irda/vlsi_ir.c:53:
include/net/irda/vlsi_ir.h:30: parse error
make[3]: *** [drivers/net/irda/vlsi_ir.o] Error 1

<--  snip  -->


vlsi_ir.h in 2.4 and 2.5 differ significantly, and I therefore suggest the
following patch to remove the compatibility stuff that caused this problem
(IMHO a better solution than an #include <linux/version.h>):


--- linux-2.5.44-full/include/net/irda/vlsi_ir.h~	2002-10-19 06:01:59.000000000 +0200
+++ linux-2.5.44-full/include/net/irda/vlsi_ir.h	2002-10-20 14:23:32.000000000 +0200
@@ -27,26 +27,6 @@
 #ifndef IRDA_VLSI_FIR_H
 #define IRDA_VLSI_FIR_H

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,4)
-#ifdef CONFIG_PROC_FS
-/* PDE() introduced in 2.5.4 */
-#define PDE(inode) ((inode)->u.generic_ip)
-#endif
-#endif
-
-/*
- * #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,xx)
- *
- * missing pci-dma api call to give streaming dma buffer back to hw
- * patch floating on lkml - probably present in 2.5.26 or later
- * otherwise defining it as noop is ok, since the vlsi-ir is only
- * used on two oldish x86-based notebooks which are cache-coherent
- */
-#define pci_dma_prep_single(dev, addr, size, direction)	/* nothing */
-/*
- * #endif
- */
-
 /* ================================================================ */

 /* non-standard PCI registers */


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





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

* Re: [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h
  2002-10-20 12:34 [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h Adrian Bunk
@ 2002-10-21 17:35 ` Jean Tourrilhes
  2002-10-21 18:34 ` Martin Diehl
  1 sibling, 0 replies; 4+ messages in thread
From: Jean Tourrilhes @ 2002-10-21 17:35 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-irda, Martin Diehl, linux-kernel, trivial

On Sun, Oct 20, 2002 at 02:34:54PM +0200, Adrian Bunk wrote:
> 
> I got the following compile error in 2.5.44:
> 
> <--  snip  -->
> 
> ...
>   gcc -Wp,-MD,drivers/net/irda/.vlsi_ir.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
> -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
> -Iarch/i386/mach-generic -nostdinc -iwithprefix include    -DKBUILD_BASENAME=vlsi_ir   -c -o
> drivers/net/irda/vlsi_ir.o drivers/net/irda/vlsi_ir.c
> In file included from drivers/net/irda/vlsi_ir.c:53:
> include/net/irda/vlsi_ir.h:30: parse error
> make[3]: *** [drivers/net/irda/vlsi_ir.o] Error 1
> 
> <--  snip  -->
> 
> 
> vlsi_ir.h in 2.4 and 2.5 differ significantly, and I therefore suggest the
> following patch to remove the compatibility stuff that caused this problem
> (IMHO a better solution than an #include <linux/version.h>):

	Thanks for the report. I personally don't care too much for
this compatibility code, so the patch is OK to me. Martin ?

	Regards,

	Jean

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

* Re: [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h
  2002-10-20 12:34 [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h Adrian Bunk
  2002-10-21 17:35 ` Jean Tourrilhes
@ 2002-10-21 18:34 ` Martin Diehl
  2002-10-29 15:55   ` Adrian Bunk
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Diehl @ 2002-10-21 18:34 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Jean Tourrilhes, linux-kernel, trivial

On Sun, 20 Oct 2002, Adrian Bunk wrote:

Hi Adrian,

> I got the following compile error in 2.5.44:
> 
> <--  snip  -->
> 
> ...
>   gcc -Wp,-MD,drivers/net/irda/.vlsi_ir.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
> -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
> -Iarch/i386/mach-generic -nostdinc -iwithprefix include    -DKBUILD_BASENAME=vlsi_ir   -c -o
> drivers/net/irda/vlsi_ir.o drivers/net/irda/vlsi_ir.c
> In file included from drivers/net/irda/vlsi_ir.c:53:
> include/net/irda/vlsi_ir.h:30: parse error
> make[3]: *** [drivers/net/irda/vlsi_ir.o] Error 1

Thanks for doing these tests. Unfortunately I've never seen this problem 
before. Might be it's because the whole linux-irda system is assumed to be 
build as module and I've almost never tried compiling it into the kernel.

Anyway, of course I agree with you the stuff must not break compiling. 
It looks like you are right, there's a linux/version.h missing in the 
includes. Does this solve the issue for you (it does for me)?

> vlsi_ir.h in 2.4 and 2.5 differ significantly, and I therefore suggest the
> following patch to remove the compatibility stuff that caused this problem
> (IMHO a better solution than an #include <linux/version.h>):

The 2.5/2.4 differences are only temporarily there and due to the usual 
approach to apply new stuff to 2.5 first before moving into 2.4. The 
current 2.5 code should go into 2.4 rather soon and there will be further 
changes along this path. So the compatibility defines are there for a good 
reason and the very few differences between 2.4 and 2.5 (wrt. this 
driver) do not justify the increased effort of having two versions.

> -#define pci_dma_prep_single(dev, addr, size, direction)	/* nothing */

If this gets removed I can assure you the driver won't compile ;-)

Please apply the following fix.

Thanks
Martin

-------------------------------------

--- linux-2.5.44/drivers/net/irda/vlsi_ir.c	Sat Oct 12 13:51:07 2002
+++ v2.5.44-md-ob/drivers/net/irda/vlsi_ir.c	Mon Oct 21 19:23:53 2002
@@ -44,6 +44,7 @@
 #include <linux/time.h>
 #include <linux/proc_fs.h>
 #include <linux/smp_lock.h>
+#include <linux/version.h>
 #include <asm/uaccess.h>
 
 #include <net/irda/irda.h>




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

* Re: [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h
  2002-10-21 18:34 ` Martin Diehl
@ 2002-10-29 15:55   ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2002-10-29 15:55 UTC (permalink / raw)
  To: Martin Diehl, Alan Cox; +Cc: Jean Tourrilhes, linux-kernel, trivial-feedback

On Mon, 21 Oct 2002, Martin Diehl wrote:

> On Sun, 20 Oct 2002, Adrian Bunk wrote:
>
> Hi Adrian,

Hi Martin,

>...
> Anyway, of course I agree with you the stuff must not break compiling.
> It looks like you are right, there's a linux/version.h missing in the
> includes. Does this solve the issue for you (it does for me)?


yes, this fixes it.

Alan:
You did already include my patch into -ac. Please remove my patch to
include/net/irda/vlsi_ir.h from -ac and include Martin's patch (at the
bottom of this mail) instead.


> > vlsi_ir.h in 2.4 and 2.5 differ significantly, and I therefore suggest the
> > following patch to remove the compatibility stuff that caused this problem
> > (IMHO a better solution than an #include <linux/version.h>):
>
> The 2.5/2.4 differences are only temporarily there and due to the usual
> approach to apply new stuff to 2.5 first before moving into 2.4. The
> current 2.5 code should go into 2.4 rather soon and there will be further
> changes along this path. So the compatibility defines are there for a good
> reason and the very few differences between 2.4 and 2.5 (wrt. this
> driver) do not justify the increased effort of having two versions.
>
> > -#define pci_dma_prep_single(dev, addr, size, direction)	/* nothing */
>
> If this gets removed I can assure you the driver won't compile ;-)

You are right, this was surrounded by so much comment that I assumed it
was a comment, too...

Unfortunately the file compiled with a "implicit declaration of function
`pci_dma_prep_single'" and since the .config I was using is far from
getting to the final linking stage I didn't notice the problem...

> Please apply the following fix.
>
> Thanks
> Martin

cu
Adrian


--- linux-2.5.44/drivers/net/irda/vlsi_ir.c	Sat Oct 12 13:51:07 2002
+++ v2.5.44-md-ob/drivers/net/irda/vlsi_ir.c	Mon Oct 21 19:23:53 2002
@@ -44,6 +44,7 @@
 #include <linux/time.h>
 #include <linux/proc_fs.h>
 #include <linux/smp_lock.h>
+#include <linux/version.h>
 #include <asm/uaccess.h>

 #include <net/irda/irda.h>








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

end of thread, other threads:[~2002-10-29 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-20 12:34 [2.5 patch] remove 2.4 compatibility code from irda/vlsi_ir.h Adrian Bunk
2002-10-21 17:35 ` Jean Tourrilhes
2002-10-21 18:34 ` Martin Diehl
2002-10-29 15:55   ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).