fs: cleanup for fs/jffs2/compr_rubin.c
PATCH 1/1 fs: cleanup for fs/jffs2/compr_rubin.c
fs: cleanup for fs/jffs2/compr_rubin.c
fs/jffs2/compr_rubin.c:
remove duplicated #include and other cleanup
--- fs/jffs2/compr_rubin.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
fs/jffs2/compr_rubin.c +5 -6
@@ -24,8 +24,6 @@#define BIT_DIVIDER_MIPS 1043static int bits_mips[8 ] = {277 ,249 ,290 ,267 ,229 ,341 ,212 ,241 };/* mips32 */ -#include <linux/errno.h> -struct pushpull {unsigned char *buf;unsigned int buflen;
@@ -157,7 +155,8 @@ static void init_decode(struct rubin_state *rs, int div, int *bits)/* behalve lower */ rs->rec_q =0 ; -for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) +for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; + rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) ; }
@@ -234,14 +233,14 @@ static int out_byte(struct rubin_state *rs, unsigned char byte)struct rubin_state rs_copy; rs_copy = *rs; -for (i=0 ;i<8 ;i++) { - ret =encode (rs, rs->bit_divider-rs->bits[i],rs->bits[i],byte&1 ); +for (i=0 ; i<8 ; i++) { + ret =encode (rs, rs->bit_divider-rs->bits[i], rs->bits[i], byte&1 );if (ret) {/* Failed. Restore old state */ *rs = rs_copy;return ret; } - byte=byte>>1 ; + byte >>=1 ; }return 0 ; }
Signature · 6 lines
1.5.6.3 -- Jianjun Kong |Happy Hacking Homepage: http://kongove.cn Gtalk:[email protected]
Quoted 34 lines · Jianjun Kong
fs: cleanup for
fs/jffs2/compr_rubin.c
fs/jffs2/compr_rubin.c:
remove duplicated #include and other cleanupSigned-off-by Jianjun Kong <[email protected]>--- fs/jffs2/compr_rubin.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)fs/jffs2/compr_rubin.c +2
-3@@ -24,8 +24,6 @@#define BIT_DIVIDER_MIPS 1043static int bits_mips[8 ] = {277 ,249 ,290 ,267 ,229 ,341 ,212 ,241 };/* mips32 */ -#include <linux/errno.h> -struct pushpull {unsigned char *buf;unsigned int buflen;@@ -157,7 +155,8 @@ static void init_decode(struct rubin_state *rs, int div, int *bits)/* behalve lower */ rs->rec_q =0 ; -for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) +for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; + rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) ; }
fs/jffs2/compr_rubin.c static int out_byte(struct rubin_state *rs, unsigned char byte) · line 236
Quoted 6 lines
fs/jffs2/compr_rubin.c +1
-2@@ -234,14 +233,14 @@ static int out_byte(struct rubin_state *rs, unsigned char byte)struct rubin_state rs_copy; rs_copy = *rs; -for (i=0 ;i<8 ;i++) { - ret =encode (rs, rs->bit_divider-rs->bits[i],rs->bits[i],byte&1 ); +for (i=0 ; i<8 ; i++) {
scripts/checkpatch.pl still complains:
ERROR: spaces required around that '=' (ctx:VxV) #47: FILE: fs/jffs2/compr_rubin.c:236:
+ for (i=0; i<8; i++) {
^
ERROR: spaces required around that '<' (ctx:VxV)
#47: FILE: fs/jffs2/compr_rubin.c:236:
+ for (i=0; i<8; i++) {
^fs/jffs2/compr_rubin.c static int out_byte(struct rubin_state *rs, unsigned char byte) · line 237
Quoted 1 line
fs/jffs2/compr_rubin.c +1
-0+ ret =encode (rs, rs->bit_divider-rs->bits[i], rs->bits[i], byte&1 );
WARNING: line over 80 characters
fs/jffs2/compr_rubin.c static int out_byte(struct rubin_state *rs, unsigned char byte) · line 246
Quoted 10 lines
fs/jffs2/compr_rubin.c +1
-1if (ret) {/* Failed. Restore old state */ *rs = rs_copy;return ret; } - byte=byte>>1 ; + byte >>=1 ; }return 0 ; }
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [email protected] Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010
PATCH 1/1 fs: cleanup for fs/jffs2/compr_rubin.c
Quoted 2 lines · Geert Uytterhoeven
Quoted 1 line · Jianjun Kong
fs: cleanup for
fs/jffs2/compr_rubin.c
<sign>
Quoted 14 lines
Review
Quoted 3 lines
(quoted diff) +1
-2- for (i=0;i<8;i++) { - ret = encode(rs, rs->bit_divider-rs->bits[i],rs->bits[i],byte&1); + for (i=0; i<8; i++) {
scripts/checkpatch.plstill complains:ERROR: spaces required around that '=' (ctx:VxV)
#47: FILE:fs/jffs2/compr_rubin.c:236:+ for (i=0; i<8; i++) { ^ ERROR: spaces required around that '<' (ctx:VxV) #47: FILE: fs/jffs2/compr_rubin.c:236: + for (i=0; i<8; i++) { ^
Quoted 3 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ ret = encode(rs, rs->bit_divider-rs->bits[i], rs->bits[i], byte&1);WARNING: line over 80 characters
Thanks for your reply.
Another new patch.
Quoted 1 line
From
f52c81569442247b530abfdf123d2a1f44619300Mon Sep 17 00:00:00 2001
From: Jianjun Kong <[email protected]>
Date: Tue, 9 Dec 2008 08:24:31 +0800
Subject: [PATCH] fs: cleanup for fs/jffs2/compr_rubin.c
remove duplicated #include and other clean
--- fs/jffs2/compr_rubin.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
fs/jffs2/compr_rubin.c +3 -4
@@ -24,8 +24,6 @@#define BIT_DIVIDER_MIPS 1043static int bits_mips[8 ] = {277 ,249 ,290 ,267 ,229 ,341 ,212 ,241 };/* mips32 */ -#include <linux/errno.h> -struct pushpull {unsigned char *buf;unsigned int buflen;
@@ -157,7 +155,8 @@ static void init_decode(struct rubin_state *rs, int div, int *bits)/* behalve lower */ rs->rec_q =0 ; -for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) +for (rs->bit_number =0 ; rs->bit_number++ <RUBIN_REG_SIZE ; + rs->rec_q = rs->rec_q *2 + (long ) (pullbit (&rs->pp))) ; }
@@ -241,7 +240,7 @@ static int out_byte(struct rubin_state *rs, unsigned char byte) *rs = rs_copy;return ret; } - byte=byte>>1 ; + byte >>=1 ; }return 0 ; }
Signature · 6 lines
1.5.6.3 -- Jianjun Kong |Happy Hacking Homepage: http://kongove.cn Gtalk:[email protected]