linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: boot/compressed/decompress.c cleanup
@ 2012-02-16  5:34 Michael Opdenacker
  2012-02-16  8:50 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2012-02-16  5:34 UTC (permalink / raw)
  To: linux, nicolas.pitre, linux-arm-kernel, linux-kernel; +Cc: Michael Opdenacker

Changes against Linus' tree

- Remove unused declarations and includes
- Remove the ARCH_HAS_DECOMP_WDOG define
  because it is only used in lib/deflate.c, which
  only the alpha architecture uses. No other architecture
  uses this define
- Remove the Trace<xx> and Assert functions which aren't used
  in decompression routines.

Tested successfully on Linux 3.3.0-rc3

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
---
 arch/arm/boot/compressed/decompress.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 07be5a2..36f92ca 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -1,37 +1,14 @@
-#define _LINUX_STRING_H_
-
 #include <linux/compiler.h>	/* for inline */
 #include <linux/types.h>	/* for size_t */
 #include <linux/stddef.h>	/* for NULL */
-#include <linux/linkage.h>
 #include <asm/string.h>
 
 extern unsigned long free_mem_ptr;
 extern unsigned long free_mem_end_ptr;
-extern void error(char *);
 
 #define STATIC static
 #define STATIC_RW_DATA	/* non-static please */
 
-#define ARCH_HAS_DECOMP_WDOG
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  define Assert(cond,msg) {if(!(cond)) error(msg);}
-#  define Trace(x) fprintf x
-#  define Tracev(x) {if (verbose) fprintf x ;}
-#  define Tracevv(x) {if (verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
 #ifdef CONFIG_KERNEL_GZIP
 #include "../../../../lib/decompress_inflate.c"
 #endif
-- 
1.7.4.1


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

* Re: [PATCH] ARM: boot/compressed/decompress.c cleanup
  2012-02-16  5:34 [PATCH] ARM: boot/compressed/decompress.c cleanup Michael Opdenacker
@ 2012-02-16  8:50 ` Russell King - ARM Linux
  2012-02-16 11:05   ` Michael Opdenacker
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2012-02-16  8:50 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: nicolas.pitre, linux-arm-kernel, linux-kernel

On Thu, Feb 16, 2012 at 06:34:09AM +0100, Michael Opdenacker wrote:
> - Remove the ARCH_HAS_DECOMP_WDOG define
>   because it is only used in lib/deflate.c, which
>   only the alpha architecture uses. No other architecture
>   uses this define

No.  Your grepping is broken.

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

* Re: [PATCH] ARM: boot/compressed/decompress.c cleanup
  2012-02-16  8:50 ` Russell King - ARM Linux
@ 2012-02-16 11:05   ` Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2012-02-16 11:05 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: nicolas.pitre, linux-kernel, linux-arm-kernel

Hi Russell,

Thank you for reviewing my patch.

On 02/16/2012 09:50 AM, Russell King - ARM Linux wrote:
> On Thu, Feb 16, 2012 at 06:34:09AM +0100, Michael Opdenacker wrote:
>> - Remove the ARCH_HAS_DECOMP_WDOG define
>>   because it is only used in lib/deflate.c, which
>>   only the alpha architecture uses. No other architecture
>>   uses this define
> No.  Your grepping is broken.
Oops, my mistake. Actually, only arm uses this feature.

I'll soon post an updated patch.

Thanks again,

Michael.

-- 
Michael Opdenacker, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+33 484 253 396


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

* [PATCH] ARM: boot/compressed/decompress.c cleanup
@ 2012-02-16 11:25 Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2012-02-16 11:25 UTC (permalink / raw)
  To: linux, nicolas.pitre, linux-arm-kernel, linux-kernel; +Cc: Michael Opdenacker

- Remove unused declarations and includes
- Remove the Trace<xx> and Assert functions which aren't used
  in decompression routines.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
---
 arch/arm/boot/compressed/decompress.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 07be5a2..ce0ceb1 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -1,37 +1,16 @@
-#define _LINUX_STRING_H_
-
 #include <linux/compiler.h>	/* for inline */
 #include <linux/types.h>	/* for size_t */
 #include <linux/stddef.h>	/* for NULL */
-#include <linux/linkage.h>
 #include <asm/string.h>
 
 extern unsigned long free_mem_ptr;
 extern unsigned long free_mem_end_ptr;
-extern void error(char *);
 
 #define STATIC static
 #define STATIC_RW_DATA	/* non-static please */
 
 #define ARCH_HAS_DECOMP_WDOG
 
-/* Diagnostic functions */
-#ifdef DEBUG
-#  define Assert(cond,msg) {if(!(cond)) error(msg);}
-#  define Trace(x) fprintf x
-#  define Tracev(x) {if (verbose) fprintf x ;}
-#  define Tracevv(x) {if (verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
 #ifdef CONFIG_KERNEL_GZIP
 #include "../../../../lib/decompress_inflate.c"
 #endif
-- 
1.7.4.1


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

end of thread, other threads:[~2012-02-16 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  5:34 [PATCH] ARM: boot/compressed/decompress.c cleanup Michael Opdenacker
2012-02-16  8:50 ` Russell King - ARM Linux
2012-02-16 11:05   ` Michael Opdenacker
  -- strict thread matches above, loose matches on Subject: below --
2012-02-16 11:25 Michael Opdenacker

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