lkml.org 
[lkml]   [2003]   [Jan]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 19 Jan 2003 11:32:33 +0000 (GMT)
FromDavid Woodhouse <>
SubjectRe: [2.5 patch] mics cleanups for mtd
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>

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

The extra #include does no harm -- do not remove it. Removing everything
from compatmac.h in 2.5 is OK though; just leave it almost empty (but with 
the #ifdef guard to prevent GCC from reading it more than once).

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.

> Besides this I removed a few #include <stdarg.h>.

OK.

-- 
dwmw2


-
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/

\
 
 \ /
  Last update: 2005-03-22 12:32    [from the cache]
©2003-2008