linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.19pre8aa1 & vm-34
@ 2002-05-03 18:37 Andrea Arcangeli
  2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Andrea Arcangeli @ 2002-05-03 18:37 UTC (permalink / raw)
  To: linux-kernel

Full patchkit:

	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1/

Only VM updates:

	http://www.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.19pre8/vm-34.gz
	http://www.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.19pre8/vm-34/

Diff between 2.4.19pre7aa3 and 2.4.19pre8aa1 besides moving from pre7 to
pre8:

Only in 2.4.19pre7aa3: 00_19pre7_x86_setup_cleanups-1
Only in 2.4.19pre7aa3: 00_backout-kio-request-1
Only in 2.4.19pre7aa3: 00_bh-IPI-1
Only in 2.4.19pre7aa3: 00_k7-prefetch-1
Only in 2.4.19pre7aa3: 00_kiobuf_init-1
Only in 2.4.19pre7aa3: 00_spinlock-cacheline-3
Only in 2.4.19pre7aa3: 00_std-serial-first-1
Only in 2.4.19pre7aa3: 00_timer_bh-deadlock-1

	Merged in mainline. BTW, please merge also the other part of the
	10_tlb-state now called 10_tlb-state-2.

Only in 2.4.19pre7aa3: 00_block-highmem-all-18b-10.gz
Only in 2.4.19pre8aa1: 00_block-highmem-all-18b-11.gz
Only in 2.4.19pre7aa3: 00_nfs-rpc-ping-1
Only in 2.4.19pre8aa1: 00_nfs-rpc-ping-2
Only in 2.4.19pre7aa3: 00_rwsem-fair-28
Only in 2.4.19pre7aa3: 00_rwsem-fair-28-recursive-8
Only in 2.4.19pre8aa1: 00_rwsem-fair-29
Only in 2.4.19pre8aa1: 00_rwsem-fair-29-recursive-8
Only in 2.4.19pre7aa3: 05_vm_17_rest-3
Only in 2.4.19pre8aa1: 05_vm_17_rest-4
Only in 2.4.19pre7aa3: 10_rawio-vary-io-7
Only in 2.4.19pre8aa1: 10_rawio-vary-io-8
Only in 2.4.19pre7aa3: 10_tlb-state-1
Only in 2.4.19pre8aa1: 10_tlb-state-2
Only in 2.4.19pre7aa3: 30_dyn-sched-5
Only in 2.4.19pre8aa1: 30_dyn-sched-6
Only in 2.4.19pre7aa3: 30_x86_setup-boot-cleanup-2
Only in 2.4.19pre8aa1: 30_x86_setup-boot-cleanup-3
Only in 2.4.19pre7aa3: 60_tux-exports-2
Only in 2.4.19pre8aa1: 60_tux-exports-3
Only in 2.4.19pre7aa3: 70_xfs-1.1-0.gz
Only in 2.4.19pre8aa1: 70_xfs-1.1-1.gz

	Rediffed due rejects.

Only in 2.4.19pre7aa3: 00_nfs-tcp-tweaks-4
Only in 2.4.19pre7aa3: 00_nfs-tcp-tweaks-4-rmv-cong-nonsense-3

	Replaced by mainline.

Only in 2.4.19pre7aa3: 00_wake_up_page-1

	Backed out because superflous. (noticed by Christoph Hellwig)

Only in 2.4.19pre7aa3: 81_x86_64-arch-5.gz
Only in 2.4.19pre8aa1: 81_x86_64-arch-6.gz
Only in 2.4.19pre8aa1: 84_x86_64-io-compile-1
Only in 2.4.19pre7aa3: 84_x86_64-out_of_line_bug-1
Only in 2.4.19pre7aa3: 85_x86_64-mmx-xmm-init-3
Only in 2.4.19pre8aa1: 85_x86_64-mmx-xmm-init-4

	Latest updates from cvs.x86-64.org CVS.

Andrea

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

* Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error
  2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
@ 2002-05-04  0:18 ` Eyal Lebedinsky
  2002-05-05  1:08   ` Mike Fedyk
  2002-05-04  0:24 ` 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure Eyal Lebedinsky
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-04  0:18 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

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

Andrea Arcangeli wrote:
> 
> Full patchkit:
> http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build,
a declaration is put in an illegal place.

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

[-- Attachment #2: 2.4.19-pre8-aa1-zftape-init.patch --]
[-- Type: text/plain, Size: 877 bytes --]

*** linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c.orig	Sat May  4 10:13:57 2002
--- linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c	Sat May  4 10:14:28 2002
***************
*** 204,214 ****
  	sigfillset(&current->blocked);
  	lock_kernel();
  	if ((result = ftape_mmap(vma)) >= 0) {
- 		vma->vm_flags &= ~VM_IO;
  #ifndef MSYNC_BUG_WAS_FIXED
  		static struct vm_operations_struct dummy = { NULL, };
  		vma->vm_ops = &dummy;
  #endif
  	}
  	unlock_kernel();
  	current->blocked = old_sigmask; /* restore mask */
--- 204,214 ----
  	sigfillset(&current->blocked);
  	lock_kernel();
  	if ((result = ftape_mmap(vma)) >= 0) {
  #ifndef MSYNC_BUG_WAS_FIXED
  		static struct vm_operations_struct dummy = { NULL, };
  		vma->vm_ops = &dummy;
  #endif
+ 		vma->vm_flags &= ~VM_IO;
  	}
  	unlock_kernel();
  	current->blocked = old_sigmask; /* restore mask */

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

* Re: 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure
  2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
  2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
@ 2002-05-04  0:24 ` Eyal Lebedinsky
  2002-05-04  7:09   ` Andrea Arcangeli
  2002-05-04  0:54 ` 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error Eyal Lebedinsky
  2002-05-04  1:30 ` 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable Eyal Lebedinsky
  3 siblings, 1 reply; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-04  0:24 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

Andrea Arcangeli wrote:
> 
> Full patchkit:
> http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

'struct kiobuf' does not have a member 'blocks', used in two places.

Should it use 'kio_blocks'?

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

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

* Re: 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error
  2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
  2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
  2002-05-04  0:24 ` 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure Eyal Lebedinsky
@ 2002-05-04  0:54 ` Eyal Lebedinsky
  2002-05-04  1:30 ` 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable Eyal Lebedinsky
  3 siblings, 0 replies; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-04  0:54 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

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

Andrea Arcangeli wrote:
> 
> Full patchkit:
> 
>         http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This problem was in -pre7, fixed in -pre8, yet it is back in -pre8-aa1!

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

[-- Attachment #2: 2.4.19-pre8-aa1-8253.patch --]
[-- Type: text/plain, Size: 365 bytes --]

--- linux/drivers/net/wan/8253x/8253xutl.c.orig	Fri Apr  5 08:52:00 2002
+++ linux/drivers/net/wan/8253x/8253xutl.c	Fri Apr  5 08:55:47 2002
@@ -1344,7 +1344,6 @@
 	while ((Sab8253xCountTransmit(port) > 0) || !port->all_sent) 
 	{
 		current->state = TASK_INTERRUPTIBLE;
-		current->counter = 0;
 		schedule_timeout(char_time);
 		if (signal_pending(current))
 		{

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

* Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
  2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
                   ` (2 preceding siblings ...)
  2002-05-04  0:54 ` 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error Eyal Lebedinsky
@ 2002-05-04  1:30 ` Eyal Lebedinsky
  2002-05-04  7:25   ` Andrea Arcangeli
  3 siblings, 1 reply; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-04  1:30 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

Andrea Arcangeli wrote:
> 
> Full patchkit:
> http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz

This is a new symbol introduced in -aa1. It ends up in drivers through
new header definitions rather than by direct use.

Should be exported?


depmod: *** Unresolved symbols in
/lib/modules/2.4.19-pre8-aa1/kernel/drivers/ieee1394/dv1394.o
depmod:         kmap_pagetable
depmod: *** Unresolved symbols in
/lib/modules/2.4.19-pre8-aa1/kernel/drivers/net/wan/comx.o
depmod:         proc_get_inode
depmod: *** Unresolved symbols in
/lib/modules/2.4.19-pre8-aa1/kernel/drivers/video/NVdriver
depmod:         kmap_pagetable

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

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

* Re: 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure
  2002-05-04  0:24 ` 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure Eyal Lebedinsky
@ 2002-05-04  7:09   ` Andrea Arcangeli
  2002-05-04 11:44     ` Andrea Arcangeli
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Arcangeli @ 2002-05-04  7:09 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-kernel

On Sat, May 04, 2002 at 10:24:42AM +1000, Eyal Lebedinsky wrote:
> Andrea Arcangeli wrote:
> > 
> > Full patchkit:
> > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> 
> 'struct kiobuf' does not have a member 'blocks', used in two places.
> 
> Should it use 'kio_blocks'?

yes. What are the two places?

thanks also for the other patch.

Andrea

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

* Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
  2002-05-04  1:30 ` 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable Eyal Lebedinsky
@ 2002-05-04  7:25   ` Andrea Arcangeli
  2002-05-04 13:41     ` Eyal Lebedinsky
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Arcangeli @ 2002-05-04  7:25 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-kernel

On Sat, May 04, 2002 at 11:30:31AM +1000, Eyal Lebedinsky wrote:
> Andrea Arcangeli wrote:
> > 
> > Full patchkit:
> > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> 
> This is a new symbol introduced in -aa1. It ends up in drivers through
> new header definitions rather than by direct use.
> 
> Should be exported?

You should #include <linux/highmem.h> in those drivers .c files, then it
will compile, but that's not the right fix, you'd need to add the
pte_kunmap too or it would deadlock with highmem. The right fix is to
convert those drivers to vmalloc_to_page, then they will work flawlessy.
Alan actually has a patch in his -ac that converted most usb and other
drivers to vmalloc_to_page, I will merge it plus I will convert those
below drivers if they're not just covered by Alan's patch. Alan could
you push it to Marcelo?

After I finished covering all the compilation failures you reported I
will upload an aa2 with all your patches included. I usually don't
compile every driver out there so I didn't noticed those problems, sorry.

> 
> 
> depmod: *** Unresolved symbols in
> /lib/modules/2.4.19-pre8-aa1/kernel/drivers/ieee1394/dv1394.o
> depmod:         kmap_pagetable
> depmod: *** Unresolved symbols in
> /lib/modules/2.4.19-pre8-aa1/kernel/drivers/net/wan/comx.o
> depmod:         proc_get_inode

actually comx is unrealted to the pte-highmem problem, to fix it we
should EXPORT_SYMBOL(proc_get_inode), but I'm not sure why it wants to
implement the dir lookup by itself instead of relying on the procfs
layer, probably to allow more functionality like mkdir/rmdir.

> depmod: *** Unresolved symbols in
> /lib/modules/2.4.19-pre8-aa1/kernel/drivers/video/NVdriver
> depmod:         kmap_pagetable
> 
> --
> Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>


Andrea

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

* Re: 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure
  2002-05-04  7:09   ` Andrea Arcangeli
@ 2002-05-04 11:44     ` Andrea Arcangeli
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Arcangeli @ 2002-05-04 11:44 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-kernel

On Sat, May 04, 2002 at 09:09:29AM +0200, Andrea Arcangeli wrote:
> On Sat, May 04, 2002 at 10:24:42AM +1000, Eyal Lebedinsky wrote:
> > Andrea Arcangeli wrote:
> > > 
> > > Full patchkit:
> > > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> > 
> > 'struct kiobuf' does not have a member 'blocks', used in two places.
> > 
> > Should it use 'kio_blocks'?
> 
> yes. What are the two places?

never mind, this should fix it:

--- 2.4.19pre8aa2/drivers/mtd/devices/blkmtd.c.~1~	Mon Feb 25 22:05:07 2002
+++ 2.4.19pre8aa2/drivers/mtd/devices/blkmtd.c	Sat May  4 13:43:01 2002
@@ -235,7 +235,7 @@
     return -ENOMEM;
   }
 #else 
-  blocks = iobuf->blocks;
+  blocks = iobuf->kio_blocks;
 #endif
 
   iobuf->offset = 0;
@@ -329,7 +329,7 @@
     return 0;
   }
 #else 
-  blocks = iobuf->blocks;
+  blocks = iobuf->kio_blocks;
 #endif
 
   DEBUG(2, "blkmtd: writetask: entering main loop\n");

Andrea

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

* Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
  2002-05-04  7:25   ` Andrea Arcangeli
@ 2002-05-04 13:41     ` Eyal Lebedinsky
  2002-05-04 13:49       ` Andrea Arcangeli
  0 siblings, 1 reply; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-04 13:41 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

Andrea Arcangeli wrote:
> 
> On Sat, May 04, 2002 at 11:30:31AM +1000, Eyal Lebedinsky wrote:
> > Andrea Arcangeli wrote:
> > >
> > > Full patchkit:
> > > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> >
> > This is a new symbol introduced in -aa1. It ends up in drivers through
> > new header definitions rather than by direct use.
> >
> > Should be exported?
> 
> You should #include <linux/highmem.h> in those drivers .c files, then it
> will compile, but that's not the right fix, you'd need to add the
> pte_kunmap too or it would deadlock with highmem. The right fix is to
> convert those drivers to vmalloc_to_page, then they will work flawlessy.

Well, this may be a problem for NVdriver (a mostly binary only driver)
which I use.

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

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

* Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
  2002-05-04 13:41     ` Eyal Lebedinsky
@ 2002-05-04 13:49       ` Andrea Arcangeli
  2002-05-05  0:26         ` Eyal Lebedinsky
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Arcangeli @ 2002-05-04 13:49 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-kernel

On Sat, May 04, 2002 at 11:41:25PM +1000, Eyal Lebedinsky wrote:
> Well, this may be a problem for NVdriver (a mostly binary only driver)
> which I use.

This should fix it:

diff -urN NVIDIA_kernel-1.0-2313/nv.c NVIDIA_kernel-1.0-2313.pte-highmem/nv.c
--- NVIDIA_kernel-1.0-2313/nv.c	Tue Nov 27 21:39:17 2001
+++ NVIDIA_kernel-1.0-2313.pte-highmem/nv.c	Sun Feb  3 16:35:18 2002
@@ -42,6 +42,7 @@
 #include <linux/interrupt.h>           
 #include <linux/tqueue.h>               // struct tq_struct 
 #include <linux/poll.h>
+#include <linux/highmem.h>
 #ifdef CONFIG_PM
 #include <linux/pm.h>                   // power management
 #endif
@@ -2267,7 +2268,7 @@
 {
     pgd_t *pg_dir;
     pmd_t *pg_mid_dir;
-    pte_t *pg_table;
+    pte_t *pg_table, pte;
 
     /* XXX do we really need this? */
     if (address > VMALLOC_START)
@@ -2297,11 +2298,13 @@
     if (pmd_none(*pg_mid_dir))
         goto failed;
 
-    pg_table = pte_offset(pg_mid_dir, address);
-    if (!pte_present(*pg_table))
+    pg_table = pte_offset_atomic(pg_mid_dir, address);
+    pte = *pg_table;
+    pte_kunmap(pg_table);
+    if (!pte_present(pte))
         goto failed;
 
-    return ((pte_val(*pg_table) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
+    return ((pte_val(pte) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
 
   failed:
     return (unsigned long) NULL;

Andrea

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

* Re: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
  2002-05-04 13:49       ` Andrea Arcangeli
@ 2002-05-05  0:26         ` Eyal Lebedinsky
  0 siblings, 0 replies; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-05  0:26 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: linux-kernel

Andrea Arcangeli wrote:
> 
> On Sat, May 04, 2002 at 11:41:25PM +1000, Eyal Lebedinsky wrote:
> > Well, this may be a problem for NVdriver (a mostly binary only driver)
> > which I use.
> 
> This should fix it:
> 
> diff -urN NVIDIA_kernel-1.0-2313/nv.c .pte-highmem/nv.c
> --- NVIDIA_kernel-1.0-2313/nv.c Tue Nov 27 21:39:17 2001
> +++ NVIDIA_kernel-1.0-2313.pte-highmem/nv.c     Sun Feb  3 16:35:18 2002

Applied to NVIDIA_kernel-1.0-2880 and it builds fine (on -aa2)
and booted OK. Thanks.

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

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

* Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error
  2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
@ 2002-05-05  1:08   ` Mike Fedyk
  2002-05-05  7:33     ` Eyal Lebedinsky
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Fedyk @ 2002-05-05  1:08 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: Andrea Arcangeli, linux-kernel

On Sat, May 04, 2002 at 10:18:13AM +1000, Eyal Lebedinsky wrote:
> Andrea Arcangeli wrote:
> > 
> > Full patchkit:
> > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> 
> linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build,
> a declaration is put in an illegal place.
>

Why is it illegal to put that before the ifdef instead of after?

That's a litle strange looking diff output, what version is it?

Which compiler gave the error?

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

* Re: 2.4.19pre8aa1 & vm-34: zftape-init.c compile error
  2002-05-05  1:08   ` Mike Fedyk
@ 2002-05-05  7:33     ` Eyal Lebedinsky
  0 siblings, 0 replies; 13+ messages in thread
From: Eyal Lebedinsky @ 2002-05-05  7:33 UTC (permalink / raw)
  To: Mike Fedyk; +Cc: linux-kernel

Mike Fedyk wrote:
> 
> On Sat, May 04, 2002 at 10:18:13AM +1000, Eyal Lebedinsky wrote:
> > Andrea Arcangeli wrote:
> > >
> > > Full patchkit:
> > > http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa1.gz
> >
> > linux-2.4-pre-aa/drivers/char/ftape/zftape/zftape-init.c fails to build,
> > a declaration is put in an illegal place.
> >
> 
> Why is it illegal to put that before the ifdef instead of after?

In standard C, declarations must precede statements in a block. When the
#if is true, the declaration is exposed, and it is after an assignment,
a syntax error.

The most general solution is to always open a new block if you need a
declaration, but here the code fragment is small enough to not do so
(but one needs to be alert).

#if ...
{
	int	x;
	x = ...
}
#endif


--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>

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

end of thread, other threads:[~2002-05-05  7:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03 18:37 2.4.19pre8aa1 & vm-34 Andrea Arcangeli
2002-05-04  0:18 ` 2.4.19pre8aa1 & vm-34: zftape-init.c compile error Eyal Lebedinsky
2002-05-05  1:08   ` Mike Fedyk
2002-05-05  7:33     ` Eyal Lebedinsky
2002-05-04  0:24 ` 2.4.19pre8aa1 & vm-34: blkmtd.c compile failure Eyal Lebedinsky
2002-05-04  7:09   ` Andrea Arcangeli
2002-05-04 11:44     ` Andrea Arcangeli
2002-05-04  0:54 ` 2.4.19pre8aa1 & vm-34: 8253xutl.c compile error Eyal Lebedinsky
2002-05-04  1:30 ` 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable Eyal Lebedinsky
2002-05-04  7:25   ` Andrea Arcangeli
2002-05-04 13:41     ` Eyal Lebedinsky
2002-05-04 13:49       ` Andrea Arcangeli
2002-05-05  0:26         ` Eyal Lebedinsky

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).