[2.4 patch] fix a compile warning in tipar.c (fwd) (fwd)
From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 01/30/04
- Previous message: Adrian Bunk: "[2.4 patch] agpgart_be.c: remove dupliacte PCI_DEVICE_ID_SI_651 entry (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 20:45:07 +0100 To: Marcelo Tosatti <marcelo@conectiva.com.br>, Romain Lievin <roms@lpg.ticalc.org>
Hi Marcelo,
the patch forwarded below still applies and compiles against
2.4.25-pre8.
Please apply
Adrian
----- Forwarded message from Adrian Bunk <bunk@fs.tum.de> -----
Date: Sat, 20 Dec 2003 00:08:38 +0100
From: Adrian Bunk <bunk@fs.tum.de>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
Romain Lievin <roms@lpg.ticalc.org>
Cc: linux-kernel@vger.kernel.org
Subject: [2.4 patch] fix a compile warning in tipar.c (fwd)
Hi Marcelo,
the patch forwarded below still applies and compiles against
2.4.24-pre1.
Please apply
Adrian
----- Forwarded message from Adrian Bunk <bunk@fs.tum.de> -----
Date: Sun, 3 Aug 2003 12:58:42 +0200
From: Adrian Bunk <bunk@fs.tum.de>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
Romain Lievin <roms@lpg.ticalc.org>
Cc: linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: [2.4 patch] fix a compile warning in tipar.c
I got the following compile warning in 2.4.22-pre10:
<-- snip -->
...
gcc -D__KERNEL__
-I/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include -
Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -nostdinc -iwithprefix
include -DKBUILD_BASENAME=tipar -c -o tipar.o tipar.c
tipar.c:76:1: warning: "minor" redefined
In file included from
/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include/linux/fs.h:16,
from
/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include/linux/capability.h:17,
from
/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include/linux/binfmts.h:5,
from
/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include/linux/sched.h:9,
from tipar.c:49:
/home/bunk/linux/kernel-2.4/linux-2.4.22-pre10-full/include/linux/kdev_t.h:81:1:
warning: this is the location of the previous definition
...
<-- snip -->
The minor #define was added to kdev_t.h in 2.4.18-pre4. The following
patch adjusts tipar.c accordingly. Besides this, it changes the kernel
version chack from a private macro to use the KERNEL_VERSION in kernel.h.
--- linux-2.4.22-pre10-full/drivers/char/tipar.c.old 2003-08-02 22:52:49.000000000 +0200
+++ linux-2.4.22-pre10-full/drivers/char/tipar.c 2003-08-02 22:57:57.000000000 +0200
@@ -71,9 +71,11 @@
#define DRIVER_DESC "Device driver for TI/PC parallel link cables"
#define DRIVER_LICENSE "GPL"
-#define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
-#if LINUX_VERSION_CODE < VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
# define minor(x) MINOR(x)
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
# define need_resched() (current->need_resched)
#endif
I've tested the compilation with 2.4.22-pre10.
Please apply
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Adrian Bunk: "[2.4 patch] agpgart_be.c: remove dupliacte PCI_DEVICE_ID_SI_651 entry (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [2.6 patch] SCSI aic7xxx: kill kernel 2.2 #ifdefs (fwd) (fwd)
... The patch forwarded below still applies and compiles against ... send the line
"unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - [2.6 patch] SCSI megaraid_mm.c: make some code static (fwd) (fwd)
... The patch forwarded below still applies and compiles against ... send the line
"unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - [2.6 patch] ide-scsi.c: make 2 functions static (fwd) (fwd)
... The patch forwarded below still applies and compiles against 2.6.10-mm2. ...
send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - [2.6 patch] small partitions/msdos cleanups (fwd) (fwd) (fwd)
... The patch forwarded below (already ACK'ed by Andries Brouwer) still ... applies
and compiles against 2.6.10-rc3-mm1. ... send the line "unsubscribe linux-kernel"
in ... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - [2.4 patch] agpgart_be.c: remove dupliacte PCI_DEVICE_ID_SI_651 entry (fwd)
... the trivial patch forwarded below still applies and compiles against ... send
the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel)