From patchwork Sat Dec 6 13:18:19 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianjun kong X-Patchwork-Id: 12563 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 CF3ECDDDCA for ; Sun, 7 Dec 2008 00:21:05 +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 1L8x3P-0006Hi-Jj; Sat, 06 Dec 2008 13:18:39 +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 1L8x3J-0006As-MT for linux-mtd@lists.infradead.org; Sat, 06 Dec 2008 13:18:34 +0000 Received: from localhost (localhost [127.0.0.1]) by z.billxu.com (Postfix) with ESMTP id 023AD735CC5; Sat, 6 Dec 2008 21:18:18 +0800 (CST) Received: from localhost (unknown [221.11.17.130]) by z.billxu.com (Postfix) with ESMTP id 09C70735CC2; Sat, 6 Dec 2008 21:18:12 +0800 (CST) Date: Sat, 6 Dec 2008 21:18:19 +0800 From: Jianjun Kong To: linux-mtd@lists.infradead.org Subject: [PATCH] fs: cleanup for fs/jffs2/compr_rubin.c Message-ID: <20081206131819.GA23873@ubuntu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 0.0 (/) Cc: David Howells , dwmw2@infradead.org 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 fs/jffs2/compr_rubin.c: remove duplicated #include and other cleanup Signed-off-by: Jianjun Kong --- fs/jffs2/compr_rubin.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index c73fa89..cb02050 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))) ; } @@ -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; }