[lkml]   [2003]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [2.5 patch] mics cleanups for mtd
On Sun, Jan 19, 2003 at 11:32:33AM +0000, David Woodhouse wrote:
> On Sun, 19 Jan 2003, Adrian Bunk wrote:
> > Below is a cleanup for mtd:
> >
> > I started with removing all #if'd code for kernels < 2.4.4.
> That's a reasonable idea, I suppose -- I haven't had someone bitch about
> me breaking the 2.2 uClinux build for a while now. I want to go further
> than that with the block device drivers -- they'll be completely forked
> for 2.4/2.5 support because it's just too ugly to try to support both.
> For most of the other code, the pain of maintaining two separate versions
> just isn't justified by the marginal cleanup which this affords --
> especially for the drivers where the _only_ difference between building
> out-of-the-box in 2.4 and not doing so is a #include <linux/mtd/compatmac.h>

The #include <linux/mtd/compatmac.h> has _no_ effect for building on 2.4
kernels, it only affects 2.0 and 2.2 kernels.

The only reason why I said kernels < 2.4.4 is that I removed some
from drivers/mtd/devices/blkmtd.c.

If you want to support the kernels 2.4.0, 2.4.1, 2.4.2 and 2.4.3 these
should be kept, but linux/mtd/compatmac.h is not needed for this.

> > After this cleanup linux/mtd/compatmac.h contained only #include's so I
> > completely removed this file, removed all #include's of it in both the
> > mtd and jffs2 (sic) code and added the few needed #include's in the .c
> > files.
> You misunderstand the purpose of this. The idea is that the code itself
> can be written for the latest kernel, but people can use it on older
> kernels and compatmac.h makes it OK. If you remove the #include
> compatmac.h then that doesn't work; obviously :)

I can send whatever patch you want.

What is the minimum kernel version you want to support:
- 2.0.0
- 2.2.0
- 2.4.0
- 2.4.4

> Adding the include files which were indirectly included through
> compatmac.h is also OK -- we can just 'touch' those to make it build with
> older kernels; they weren't intentionally omitted.

I haven't checked older kernels but at least kernel 2.2.20 includes all
header files I've added (init.h, sched.h, vmalloc.h).

> dwmw2



"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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.063 / U:3.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site