Re: [PATCH 1/3] Remove unused dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2007-12-22 at 15:31 +0100, Sam Ravnborg wrote:
> I looked at how inflate was used:
>  
> $ grep inflate */boot/Makefile
> alpha/boot/Makefile:$(obj)/misc.o: lib/inflate.c
> => redundandt dependency, can be deleted
> A cleanup of all this is needed.

Perhaps it's better to move lib/inflate.c to the
include path (include/lib ?) and convert the files that
#include "(../)*lib/inflate.c" to
#include <lib/inflate.c>?


 arch/alpha/boot/Makefile                  |    2 --
 arch/alpha/boot/misc.c                    |    2 +-
 arch/arm/boot/compressed/Makefile         |    2 +-
 arch/arm/boot/compressed/misc.c           |    2 +-
 arch/cris/arch-v10/boot/compressed/misc.c |    2 +-
 arch/cris/arch-v32/boot/compressed/misc.c |    2 +-
 arch/h8300/boot/compressed/misc.c         |    2 +-
 arch/m32r/boot/compressed/misc.c          |    2 +-
 arch/sh/boot/compressed/misc.c            |    2 +-
 arch/sh64/boot/compressed/misc.c          |    2 +-
 arch/x86/boot/compressed/misc_32.c        |    2 +-
 arch/x86/boot/compressed/misc_64.c        |    2 +-
 {lib => include/lib}/inflate.c            |    0 
 init/do_mounts_rd.c                       |    2 +-
 init/initramfs.c                          |    2 +-
 15 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile
index cd14388..c53169c 100644
--- a/arch/alpha/boot/Makefile
+++ b/arch/alpha/boot/Makefile
@@ -112,5 +112,3 @@ $(obj)/bootpheader: $(obj)/bootloader.lds $(OBJ_bootph) $(LIBS_Y) FORCE
 
 $(obj)/bootpzheader: $(obj)/bootloader.lds $(OBJ_bootpzh) $(LIBS_Y) FORCE
 	$(call if_changed,ld)
-
-$(obj)/misc.o: lib/inflate.c
diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index c00646b..c132505 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -100,7 +100,7 @@ static ulg free_mem_ptr_end;
 
 #define HEAP_SIZE 0x3000
 
-#include "../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5fde99f..563cfc2 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -111,5 +111,5 @@ $(obj)/font.c: $(FONTC)
 $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
 	@sed "$(SEDFLAGS)" < $< > $@
 
-$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c
+$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h
 
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 9b44402..7c3850d 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -241,7 +241,7 @@ static ulg free_mem_ptr_end;
 
 #define HEAP_SIZE 0x3000
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 #ifndef STANDALONE_DEBUG
 static void *malloc(int size)
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c
index e205d2e..3298a66 100644
--- a/arch/cris/arch-v10/boot/compressed/misc.c
+++ b/arch/cris/arch-v10/boot/compressed/misc.c
@@ -108,7 +108,7 @@ static void puts(const char *);
 extern int end;
 static long free_mem_ptr = (long)&end;
  
-#include "../../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c
index 0169ba1..dc5a119 100644
--- a/arch/cris/arch-v32/boot/compressed/misc.c
+++ b/arch/cris/arch-v32/boot/compressed/misc.c
@@ -110,7 +110,7 @@ static void puts(const char *);
 extern int _end;
 static long free_mem_ptr = (long)&_end;
 
-#include "../../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/h8300/boot/compressed/misc.c b/arch/h8300/boot/compressed/misc.c
index 8450745..863d794 100644
--- a/arch/h8300/boot/compressed/misc.c
+++ b/arch/h8300/boot/compressed/misc.c
@@ -92,7 +92,7 @@ static unsigned long free_mem_end_ptr;
 
 #define HEAP_SIZE             0x10000
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 #define SCR *((volatile unsigned char *)0xffff8a)
 #define TDR *((volatile unsigned char *)0xffff8b)
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c
index 600d40e..dac3a0b 100644
--- a/arch/m32r/boot/compressed/misc.c
+++ b/arch/m32r/boot/compressed/misc.c
@@ -90,7 +90,7 @@ static unsigned long free_mem_end_ptr;
 
 #define HEAP_SIZE             0x10000
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
index df65e30..a00dd7e 100644
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -99,7 +99,7 @@ static unsigned long free_mem_end_ptr;
 
 #define HEAP_SIZE             0x10000
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/sh64/boot/compressed/misc.c b/arch/sh64/boot/compressed/misc.c
index aea00c5..3b151f4 100644
--- a/arch/sh64/boot/compressed/misc.c
+++ b/arch/sh64/boot/compressed/misc.c
@@ -97,7 +97,7 @@ static unsigned long free_mem_end_ptr;
 
 #define HEAP_SIZE             0x10000
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/x86/boot/compressed/misc_32.c b/arch/x86/boot/compressed/misc_32.c
index b74d60d..fd8674e 100644
--- a/arch/x86/boot/compressed/misc_32.c
+++ b/arch/x86/boot/compressed/misc_32.c
@@ -199,7 +199,7 @@ static int lines, cols;
 void *xquad_portio;
 #endif
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/arch/x86/boot/compressed/misc_64.c b/arch/x86/boot/compressed/misc_64.c
index 6ea015a..315e667 100644
--- a/arch/x86/boot/compressed/misc_64.c
+++ b/arch/x86/boot/compressed/misc_64.c
@@ -195,7 +195,7 @@ static char *vidmem = (char *)0xb8000;
 static int vidport;
 static int lines, cols;
 
-#include "../../../../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void *malloc(int size)
 {
diff --git a/lib/inflate.c b/include/lib/inflate.c
similarity index 100%
rename from lib/inflate.c
rename to include/lib/inflate.c
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 3ac5904..cf364f6 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -319,7 +319,7 @@ static void __init error(char *m);
 static void __init gzip_mark(void **);
 static void __init gzip_release(void **);
 
-#include "../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void __init *malloc(size_t size)
 {
diff --git a/init/initramfs.c b/init/initramfs.c
index 1db02a0..23c588b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -410,7 +410,7 @@ static void __init error(char *m);
 static void __init gzip_mark(void **);
 static void __init gzip_release(void **);
 
-#include "../lib/inflate.c"
+#include <lib/inflate.c>
 
 static void __init gzip_mark(void **ptr)
 {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux