From patchwork Tue Dec 9 00:32:25 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianjun kong X-Patchwork-Id: 12903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 129E4DDF20 for ; Tue, 9 Dec 2008 20:17:52 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L9yhW-0003il-AK; Tue, 09 Dec 2008 09:16:18 +0000 Received: from smtp.zeuux.org ([210.51.160.52] helo=z.billxu.com) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L9qfh-0004ll-Rq for linux-mtd@lists.infradead.org; Tue, 09 Dec 2008 00:41:54 +0000 Received: from localhost (localhost [127.0.0.1]) by z.billxu.com (Postfix) with ESMTP id 81E24735CC8; Tue, 9 Dec 2008 08:32:28 +0800 (CST) Received: from localhost (unknown [221.11.17.130]) by z.billxu.com (Postfix) with ESMTP id 12824735CC5; Tue, 9 Dec 2008 08:32:24 +0800 (CST) Date: Tue, 9 Dec 2008 08:32:25 +0800 From: Jianjun Kong To: Geert Uytterhoeven Subject: [PATCH] fs: cleanup for fs/jffs2/compr_rubin.c Message-ID: <20081209003225.GA7198@ubuntu> References: <20081208150554.GA22245@ubuntu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Tue, 09 Dec 2008 04:16:17 -0500 Cc: linux-mtd@lists.infradead.org, David.Woodhouse@intel.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, Dec 08, 2008 at 04:39:20PM +0100, Geert Uytterhoeven wrote: >On Mon, 8 Dec 2008, Jianjun Kong wrote: >> fs: cleanup for fs/jffs2/compr_rubin.c >> - 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++) { > ^ >> + 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. >From f52c81569442247b530abfdf123d2a1f44619300 Mon Sep 17 00:00:00 2001 From: Jianjun Kong 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 Signed-off-by: Jianjun Kong Reported-by: Geert Uytterhoeven --- fs/jffs2/compr_rubin.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index c73fa89..35f1652 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -24,8 +24,6 @@ #define BIT_DIVIDER_MIPS 1043 static int bits_mips[8] = { 277,249,290,267,229,341,212,241}; /* mips32 */ -#include - 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; }