aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/compr.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-11-07 06:16:07 -0500
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-07 08:18:56 -0500
commit182ec4eee397543101a6db8906ed88727d3f7e53 (patch)
tree0f6dd2c52697123702bdf0c3a7143537f947b060 /fs/jffs2/compr.c
parent97894cda5773e59bd13e87b72077751099419a9f (diff)
[JFFS2] Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/compr.c')
-rw-r--r--fs/jffs2/compr.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c
index c9e54b97dba8..e7944e665b9f 100644
--- a/fs/jffs2/compr.c
+++ b/fs/jffs2/compr.c
@@ -9,7 +9,7 @@
9 * 9 *
10 * For licensing information, see the file 'LICENCE' in this directory. 10 * For licensing information, see the file 'LICENCE' in this directory.
11 * 11 *
12 * $Id: compr.c,v 1.45 2005/07/26 13:24:40 havasi Exp $ 12 * $Id: compr.c,v 1.46 2005/11/07 11:14:38 gleixner Exp $
13 * 13 *
14 */ 14 */
15 15
@@ -36,16 +36,16 @@ static uint32_t none_stat_compr_blocks=0,none_stat_decompr_blocks=0,none_stat_co
36 * data. 36 * data.
37 * 37 *
38 * Returns: Lower byte to be stored with data indicating compression type used. 38 * Returns: Lower byte to be stored with data indicating compression type used.
39 * Zero is used to show that the data could not be compressed - the 39 * Zero is used to show that the data could not be compressed - the
40 * compressed version was actually larger than the original. 40 * compressed version was actually larger than the original.
41 * Upper byte will be used later. (soon) 41 * Upper byte will be used later. (soon)
42 * 42 *
43 * If the cdata buffer isn't large enough to hold all the uncompressed data, 43 * If the cdata buffer isn't large enough to hold all the uncompressed data,
44 * jffs2_compress should compress as much as will fit, and should set 44 * jffs2_compress should compress as much as will fit, and should set
45 * *datalen accordingly to show the amount of data which were compressed. 45 * *datalen accordingly to show the amount of data which were compressed.
46 */ 46 */
47uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, 47uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
48 unsigned char *data_in, unsigned char **cpage_out, 48 unsigned char *data_in, unsigned char **cpage_out,
49 uint32_t *datalen, uint32_t *cdatalen) 49 uint32_t *datalen, uint32_t *cdatalen)
50{ 50{
51 int ret = JFFS2_COMPR_NONE; 51 int ret = JFFS2_COMPR_NONE;
@@ -164,7 +164,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
164} 164}
165 165
166int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, 166int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
167 uint16_t comprtype, unsigned char *cdata_in, 167 uint16_t comprtype, unsigned char *cdata_in,
168 unsigned char *data_out, uint32_t cdatalen, uint32_t datalen) 168 unsigned char *data_out, uint32_t cdatalen, uint32_t datalen)
169{ 169{
170 struct jffs2_compressor *this; 170 struct jffs2_compressor *this;
@@ -298,7 +298,7 @@ char *jffs2_stats(void)
298 298
299 act_buf += sprintf(act_buf,"JFFS2 compressor statistics:\n"); 299 act_buf += sprintf(act_buf,"JFFS2 compressor statistics:\n");
300 act_buf += sprintf(act_buf,"%10s ","none"); 300 act_buf += sprintf(act_buf,"%10s ","none");
301 act_buf += sprintf(act_buf,"compr: %d blocks (%d) decompr: %d blocks\n", none_stat_compr_blocks, 301 act_buf += sprintf(act_buf,"compr: %d blocks (%d) decompr: %d blocks\n", none_stat_compr_blocks,
302 none_stat_compr_size, none_stat_decompr_blocks); 302 none_stat_compr_size, none_stat_decompr_blocks);
303 spin_lock(&jffs2_compressor_list_lock); 303 spin_lock(&jffs2_compressor_list_lock);
304 list_for_each_entry(this, &jffs2_compressor_list, list) { 304 list_for_each_entry(this, &jffs2_compressor_list, list) {
@@ -307,8 +307,8 @@ char *jffs2_stats(void)
307 act_buf += sprintf(act_buf,"- "); 307 act_buf += sprintf(act_buf,"- ");
308 else 308 else
309 act_buf += sprintf(act_buf,"+ "); 309 act_buf += sprintf(act_buf,"+ ");
310 act_buf += sprintf(act_buf,"compr: %d blocks (%d/%d) decompr: %d blocks ", this->stat_compr_blocks, 310 act_buf += sprintf(act_buf,"compr: %d blocks (%d/%d) decompr: %d blocks ", this->stat_compr_blocks,
311 this->stat_compr_new_size, this->stat_compr_orig_size, 311 this->stat_compr_new_size, this->stat_compr_orig_size,
312 this->stat_decompr_blocks); 312 this->stat_decompr_blocks);
313 act_buf += sprintf(act_buf,"\n"); 313 act_buf += sprintf(act_buf,"\n");
314 } 314 }
@@ -317,7 +317,7 @@ char *jffs2_stats(void)
317 return buf; 317 return buf;
318} 318}
319 319
320char *jffs2_get_compression_mode_name(void) 320char *jffs2_get_compression_mode_name(void)
321{ 321{
322 switch (jffs2_compression_mode) { 322 switch (jffs2_compression_mode) {
323 case JFFS2_COMPR_MODE_NONE: 323 case JFFS2_COMPR_MODE_NONE:
@@ -330,7 +330,7 @@ char *jffs2_get_compression_mode_name(void)
330 return "unkown"; 330 return "unkown";
331} 331}
332 332
333int jffs2_set_compression_mode_name(const char *name) 333int jffs2_set_compression_mode_name(const char *name)
334{ 334{
335 if (!strcmp("none",name)) { 335 if (!strcmp("none",name)) {
336 jffs2_compression_mode = JFFS2_COMPR_MODE_NONE; 336 jffs2_compression_mode = JFFS2_COMPR_MODE_NONE;
@@ -355,7 +355,7 @@ static int jffs2_compressor_Xable(const char *name, int disabled)
355 if (!strcmp(this->name, name)) { 355 if (!strcmp(this->name, name)) {
356 this->disabled = disabled; 356 this->disabled = disabled;
357 spin_unlock(&jffs2_compressor_list_lock); 357 spin_unlock(&jffs2_compressor_list_lock);
358 return 0; 358 return 0;
359 } 359 }
360 } 360 }
361 spin_unlock(&jffs2_compressor_list_lock); 361 spin_unlock(&jffs2_compressor_list_lock);
@@ -385,7 +385,7 @@ int jffs2_set_compressor_priority(const char *name, int priority)
385 } 385 }
386 } 386 }
387 spin_unlock(&jffs2_compressor_list_lock); 387 spin_unlock(&jffs2_compressor_list_lock);
388 printk(KERN_WARNING "JFFS2: compressor %s not found.\n",name); 388 printk(KERN_WARNING "JFFS2: compressor %s not found.\n",name);
389 return 1; 389 return 1;
390reinsert: 390reinsert:
391 /* list is sorted in the order of priority, so if 391 /* list is sorted in the order of priority, so if
@@ -412,7 +412,7 @@ void jffs2_free_comprbuf(unsigned char *comprbuf, unsigned char *orig)
412 kfree(comprbuf); 412 kfree(comprbuf);
413} 413}
414 414
415int jffs2_compressors_init(void) 415int jffs2_compressors_init(void)
416{ 416{
417/* Registering compressors */ 417/* Registering compressors */
418#ifdef CONFIG_JFFS2_ZLIB 418#ifdef CONFIG_JFFS2_ZLIB
@@ -440,7 +440,7 @@ int jffs2_compressors_init(void)
440 return 0; 440 return 0;
441} 441}
442 442
443int jffs2_compressors_exit(void) 443int jffs2_compressors_exit(void)
444{ 444{
445/* Unregistering compressors */ 445/* Unregistering compressors */
446#ifdef CONFIG_JFFS2_RUBIN 446#ifdef CONFIG_JFFS2_RUBIN