Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
initramfs-support-initramfs-that-is-more-than-2g-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: quoted string split across lines
torvalds#60: FILE: fs/isofs/compress.c:163:
 					       " page idx = %d, bh idx = %d,"
+					       " avail_in = %ld,"

WARNING: quoted string split across lines
torvalds#61: FILE: fs/isofs/compress.c:164:
+					       " avail_in = %ld,"
+					       " avail_out = %ld\n",

WARNING: missing space after return type
torvalds#76: FILE: include/linux/decompress/bunzip2.h:5:
+	    long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#77: FILE: include/linux/decompress/bunzip2.h:6:
+	    long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#94: FILE: include/linux/decompress/generic.h:5:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#95: FILE: include/linux/decompress/generic.h:6:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#122: FILE: include/linux/decompress/inflate.h:5:
+	   long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#123: FILE: include/linux/decompress/inflate.h:6:
+	   long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#140: FILE: include/linux/decompress/unlz4.h:5:
+	long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#141: FILE: include/linux/decompress/unlz4.h:6:
+	long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#158: FILE: include/linux/decompress/unlzma.h:5:
+	   long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#159: FILE: include/linux/decompress/unlzma.h:6:
+	   long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#177: FILE: include/linux/decompress/unlzo.h:5:
+	long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#178: FILE: include/linux/decompress/unlzo.h:6:
+	long(*flush)(void*, unsigned long),

WARNING: please, no spaces at the start of a line
torvalds#210: FILE: include/linux/zlib.h:86:
+    uLong     avail_in;  /* number of bytes available at next_in */$

WARNING: please, no spaces at the start of a line
torvalds#215: FILE: include/linux/zlib.h:90:
+    uLong     avail_out; /* remaining free space at next_out */$

WARNING: __initdata should be placed after count
torvalds#259: FILE: init/initramfs.c:177:
+static __initdata unsigned long count;

WARNING: __initdata should be placed after remains
torvalds#268: FILE: init/initramfs.c:189:
+static __initdata long remains;

WARNING: missing space after return type
torvalds#385: FILE: lib/decompress_bunzip2.c:679:
+			long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#386: FILE: lib/decompress_bunzip2.c:680:
+			long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#401: FILE: lib/decompress_bunzip2.c:747:
+			long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#402: FILE: lib/decompress_bunzip2.c:748:
+			long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#427: FILE: lib/decompress_inflate.c:37:
+		       long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#428: FILE: lib/decompress_inflate.c:38:
+		       long(*flush)(void*, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#456: FILE: lib/decompress_unlz4.c:35:
+				long (*fill) (void *, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#457: FILE: lib/decompress_unlz4.c:36:
+				long (*flush) (void *, unsigned long),

WARNING: missing space after return type
torvalds#479: FILE: lib/decompress_unlz4.c:179:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#480: FILE: lib/decompress_unlz4.c:180:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#529: FILE: lib/decompress_unlzma.c:283:
+	long(*flush)(void*, unsigned long);

WARNING: missing space after return type
torvalds#541: FILE: lib/decompress_unlzma.c:538:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#542: FILE: lib/decompress_unlzma.c:539:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#557: FILE: lib/decompress_unlzma.c:671:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#558: FILE: lib/decompress_unlzma.c:672:
+			      long(*flush)(void*, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#586: FILE: lib/decompress_unlzo.c:112:
+				long (*fill) (void *, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#587: FILE: lib/decompress_unlzo.c:113:
+				long (*flush) (void *, unsigned long),

total: 0 errors, 35 warnings, 479 lines checked

./patches/initramfs-support-initramfs-that-is-more-than-2g.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 authored and sfrothwell committed Jun 20, 2014
1 parent 8d9dfa4 commit c923ec1
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions include/linux/decompress/bunzip2.h
Expand Up @@ -2,9 +2,9 @@
#define DECOMPRESS_BUNZIP2_H

int bunzip2(unsigned char *inbuf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *pos,
void(*error)(char *x));
void (*error)(char *x));
#endif
6 changes: 3 additions & 3 deletions include/linux/decompress/generic.h
Expand Up @@ -2,11 +2,11 @@
#define DECOMPRESS_GENERIC_H

typedef int (*decompress_fn) (unsigned char *inbuf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *outbuf,
long *posp,
void(*error)(char *x));
void (*error)(char *x));

/* inbuf - input buffer
*len - len of pre-read data in inbuf
Expand Down
6 changes: 3 additions & 3 deletions include/linux/decompress/inflate.h
Expand Up @@ -2,9 +2,9 @@
#define LINUX_DECOMPRESS_INFLATE_H

int gunzip(unsigned char *inbuf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *pos,
void(*error_fn)(char *x));
void (*error_fn)(char *x));
#endif
6 changes: 3 additions & 3 deletions include/linux/decompress/unlz4.h
Expand Up @@ -2,9 +2,9 @@
#define DECOMPRESS_UNLZ4_H

int unlz4(unsigned char *inbuf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *pos,
void(*error)(char *x));
void (*error)(char *x));
#endif
6 changes: 3 additions & 3 deletions include/linux/decompress/unlzma.h
Expand Up @@ -2,11 +2,11 @@
#define DECOMPRESS_UNLZMA_H

int unlzma(unsigned char *, long,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *posp,
void(*error)(char *x)
void (*error)(char *x)
);

#endif
6 changes: 3 additions & 3 deletions include/linux/decompress/unlzo.h
Expand Up @@ -2,9 +2,9 @@
#define DECOMPRESS_UNLZO_H

int unlzo(unsigned char *inbuf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *pos,
void(*error)(char *x));
void (*error)(char *x));
#endif
6 changes: 3 additions & 3 deletions init/initramfs.c
Expand Up @@ -173,9 +173,9 @@ static __initdata enum state {
Reset
} state, next_state;

static __initdata char *victim;
static __initdata unsigned long count;
static __initdata loff_t this_header, next_header;
static char *victim __initdata;
static unsigned long count __initdata;
static loff_t this_header, next_header __initdata;

static inline void __init eat(unsigned n)
{
Expand Down
12 changes: 6 additions & 6 deletions lib/decompress_bunzip2.c
Expand Up @@ -676,11 +676,11 @@ static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, long len,
/* Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data,
not end of file.) */
STATIC int INIT bunzip2(unsigned char *buf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *outbuf,
long *pos,
void(*error)(char *x))
void (*error)(char *x))
{
struct bunzip_data *bd;
int i = -1;
Expand Down Expand Up @@ -744,11 +744,11 @@ STATIC int INIT bunzip2(unsigned char *buf, long len,

#ifdef PREBOOT
STATIC int INIT decompress(unsigned char *buf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *outbuf,
long *pos,
void(*error)(char *x))
void (*error)(char *x))
{
return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/decompress_inflate.c
Expand Up @@ -34,11 +34,11 @@ static long INIT nofill(void *buffer, unsigned long len)

/* Included from initramfs et al code */
STATIC int INIT gunzip(unsigned char *buf, long len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *out_buf,
long *pos,
void(*error)(char *x)) {
void (*error)(char *x)) {
u8 *zbuf;
struct z_stream_s *strm;
int rc;
Expand Down
6 changes: 3 additions & 3 deletions lib/decompress_unlz4.c
Expand Up @@ -176,11 +176,11 @@ STATIC inline int INIT unlz4(u8 *input, long in_len,

#ifdef PREBOOT
STATIC int INIT decompress(unsigned char *buf, long in_len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *posp,
void(*error)(char *x)
void (*error)(char *x)
)
{
return unlz4(buf, in_len - 4, fill, flush, output, posp, error);
Expand Down
14 changes: 7 additions & 7 deletions lib/decompress_unlzma.c
Expand Up @@ -280,7 +280,7 @@ struct writer {
size_t buffer_pos;
int bufsize;
size_t global_pos;
long(*flush)(void*, unsigned long);
long (*flush)(void*, unsigned long);
struct lzma_header *header;
};

Expand Down Expand Up @@ -535,11 +535,11 @@ static inline int INIT process_bit1(struct writer *wr, struct rc *rc,


STATIC inline int INIT unlzma(unsigned char *buf, long in_len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *posp,
void(*error)(char *x)
void (*error)(char *x)
)
{
struct lzma_header header;
Expand Down Expand Up @@ -668,11 +668,11 @@ STATIC inline int INIT unlzma(unsigned char *buf, long in_len,

#ifdef PREBOOT
STATIC int INIT decompress(unsigned char *buf, long in_len,
long(*fill)(void*, unsigned long),
long(*flush)(void*, unsigned long),
long (*fill)(void*, unsigned long),
long (*flush)(void*, unsigned long),
unsigned char *output,
long *posp,
void(*error)(char *x)
void (*error)(char *x)
)
{
return unlzma(buf, in_len - 4, fill, flush, output, posp, error);
Expand Down

0 comments on commit c923ec1

Please sign in to comment.