* [miniPATCH][RFC] Compilation fixes in the 2.5.44
@ 2002-10-25 6:28 Jan Marek
2002-10-25 11:44 ` Denis Vlasenko
0 siblings, 1 reply; 3+ messages in thread
From: Jan Marek @ 2002-10-25 6:28 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
Hallo l-k,
I'm beginner in the kernel hacking (or fixing ;-))).
I have small patch, which is fixing some compilation errors (I'm using
gcc-2.95.4-17 from Debian sid).
The first chunk fixed this warning:
arch/i386/kernel/irq.c: In function `do_IRQ':
arch/i386/kernel/irq.c:331: warning: unused variable `esp'
I move declaration of variable esp to the #ifdef blok, where it is
using...
The second chunk fixed this warning:
In file included from arch/i386/kernel/timers/timer_pit.c:15:
arch/i386/mach-generic/do_timer.h: In function `do_timer_interrupt_hook':
arch/i386/mach-generic/do_timer.h:26: warning: implicit declaration of
function `smp_local_timer_interrupt'
I've found, that declaration of function do_timer_interrupt_hook is in
the header asm/apic.h and it is as:
extern void do_timer_interrupt_hook...
Then I add #include of asm/apic.h
The third chunk fixed this error:
net/ipv4/raw.c: In function `raw_send_hdrinc':
net/ipv4/raw.c:297: `NF_IP_LOCAL_OUT' undeclared (first use in this
function)
net/ipv4/raw.c:297: (Each undeclared identifier is reported only once
net/ipv4/raw.c:297: for each function it appears in.)
In this case was missing #include of netfilter_ipv4.h...
Any comments and sugestion is welcome...
Sincerely
Jan Marek
--
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080
[-- Attachment #2: fixes.patch --]
[-- Type: text/plain, Size: 1595 bytes --]
diff -urN linux-2.5.44/arch/i386/kernel/irq.c linux-2.5.44-new/arch/i386/kernel/irq.c
--- linux-2.5.44/arch/i386/kernel/irq.c 2002-10-19 06:01:09.000000000 +0200
+++ linux-2.5.44-new/arch/i386/kernel/irq.c 2002-10-24 19:54:19.000000000 +0200
@@ -328,12 +328,12 @@
irq_desc_t *desc = irq_desc + irq;
struct irqaction * action;
unsigned int status;
- long esp;
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
+ long esp;
__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
extern void show_stack(unsigned long *);
diff -urN linux-2.5.44/arch/i386/mach-generic/do_timer.h linux-2.5.44-new/arch/i386/mach-generic/do_timer.h
--- linux-2.5.44/arch/i386/mach-generic/do_timer.h 2002-10-19 06:02:30.000000000 +0200
+++ linux-2.5.44-new/arch/i386/mach-generic/do_timer.h 2002-10-24 20:09:31.000000000 +0200
@@ -1,5 +1,7 @@
/* defines for inline arch setup functions */
+#include <asm/apic.h>
+
/**
* do_timer_interrupt_hook - hook into timer tick
* @regs: standard registers from interrupt
diff -urN linux-2.5.44/net/ipv4/raw.c linux-2.5.44-new/net/ipv4/raw.c
--- linux-2.5.44/net/ipv4/raw.c 2002-10-19 06:01:07.000000000 +0200
+++ linux-2.5.44-new/net/ipv4/raw.c 2002-10-24 20:24:17.000000000 +0200
@@ -65,6 +65,7 @@
#include <net/inet_common.h>
#include <net/checksum.h>
#include <linux/netfilter.h>
+#include <linux/netfilter_ipv4.h>
struct sock *raw_v4_htable[RAWV4_HTABLE_SIZE];
rwlock_t raw_v4_lock = RW_LOCK_UNLOCKED;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [miniPATCH][RFC] Compilation fixes in the 2.5.44
2002-10-25 11:44 ` Denis Vlasenko
@ 2002-10-25 8:01 ` Andrey Panin
0 siblings, 0 replies; 3+ messages in thread
From: Andrey Panin @ 2002-10-25 8:01 UTC (permalink / raw)
To: Denis Vlasenko; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On Fri, Oct 25, 2002 at 09:44:21AM -0200, Denis Vlasenko wrote:
> On 25 October 2002 04:28, Jan Marek wrote:
> > Hallo l-k,
> >
> > I'm beginner in the kernel hacking (or fixing ;-))).
> >
> > I have small patch, which is fixing some compilation errors (I'm
> > using gcc-2.95.4-17 from Debian sid).
> >
> > The first chunk fixed this warning:
> >
> > arch/i386/kernel/irq.c: In function `do_IRQ':
> > arch/i386/kernel/irq.c:331: warning: unused variable `esp'
> >
> > I move declaration of variable esp to the #ifdef blok, where it is
> > using...
>
>
> unsigned int status;
> - long esp;
>
> irq_enter();
>
> #ifdef CONFIG_DEBUG_STACKOVERFLOW
> /* Debugging check for stack overflow: is there less than 1KB free? */
> + long esp;
>
> Most C compilers don't allow you to mix declarations and code.
> This is allowed only in new C standards. But GCC 3 seems to cope,
> so it's probably fine for new kernels.
This fragment must be fixed, look at Documentation/Changes:
"The recommended compiler for the kernel is gcc 2.95.x (x >= 3)"
Best regards.
--
Andrey Panin | Embedded systems software developer
pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.net
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [miniPATCH][RFC] Compilation fixes in the 2.5.44
2002-10-25 6:28 [miniPATCH][RFC] Compilation fixes in the 2.5.44 Jan Marek
@ 2002-10-25 11:44 ` Denis Vlasenko
2002-10-25 8:01 ` Andrey Panin
0 siblings, 1 reply; 3+ messages in thread
From: Denis Vlasenko @ 2002-10-25 11:44 UTC (permalink / raw)
To: Jan Marek, linux-kernel
On 25 October 2002 04:28, Jan Marek wrote:
> Hallo l-k,
>
> I'm beginner in the kernel hacking (or fixing ;-))).
>
> I have small patch, which is fixing some compilation errors (I'm
> using gcc-2.95.4-17 from Debian sid).
>
> The first chunk fixed this warning:
>
> arch/i386/kernel/irq.c: In function `do_IRQ':
> arch/i386/kernel/irq.c:331: warning: unused variable `esp'
>
> I move declaration of variable esp to the #ifdef blok, where it is
> using...
unsigned int status;
- long esp;
irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
+ long esp;
Most C compilers don't allow you to mix declarations and code.
This is allowed only in new C standards. But GCC 3 seems to cope,
so it's probably fine for new kernels.
> The second chunk fixed this warning:
>
> In file included from arch/i386/kernel/timers/timer_pit.c:15:
> arch/i386/mach-generic/do_timer.h: In function
> `do_timer_interrupt_hook': arch/i386/mach-generic/do_timer.h:26:
> warning: implicit declaration of function `smp_local_timer_interrupt'
>
> I've found, that declaration of function do_timer_interrupt_hook is
> in the header asm/apic.h and it is as:
>
> extern void do_timer_interrupt_hook...
>
> Then I add #include of asm/apic.h
>
> The third chunk fixed this error:
>
> net/ipv4/raw.c: In function `raw_send_hdrinc':
> net/ipv4/raw.c:297: `NF_IP_LOCAL_OUT' undeclared (first use in this
> function)
> net/ipv4/raw.c:297: (Each undeclared identifier is reported only once
> net/ipv4/raw.c:297: for each function it appears in.)
>
> In this case was missing #include of netfilter_ipv4.h...
I think #include fixes are best sent to Rusty Trivial Russell.
Rusty Russell <rusty@rustcorp.com.au> [5 feb 2002]
> Here are some cleanups of whitespace in .....
Want me to add this to the trivial patch collection for tracking?
If so just send (or cc:) it to trivial@rustcorp.com.au.
BTW, never misspell his name, he will be very upset.
He is *Russell*. Note which letters are doubled and which are not. ;)
--
vda
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-25 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 6:28 [miniPATCH][RFC] Compilation fixes in the 2.5.44 Jan Marek
2002-10-25 11:44 ` Denis Vlasenko
2002-10-25 8:01 ` Andrey Panin
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).