diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-09-22 22:52:33 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-24 19:49:11 -0400 |
commit | 088bd455c954c0c42edde9d4463e44be10101aac (patch) | |
tree | fb1f5d05429bc1f68330adb8cc08cdb0741f5357 /fs/jffs2 | |
parent | d0f7959e2b708d775c3b6b53cc6a8abb8ff0a00b (diff) |
jffs2: drop unused model argument
The jffs2 compression framework provides a "model" argument when
compressing and decompressing, but the caller always passes in NULL
and the callees never use it. So punt this useless overhead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/compr.c | 6 | ||||
-rw-r--r-- | fs/jffs2/compr.h | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_lzo.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_rtime.c | 6 | ||||
-rw-r--r-- | fs/jffs2/compr_rubin.c | 11 | ||||
-rw-r--r-- | fs/jffs2/compr_zlib.c | 6 |
6 files changed, 15 insertions, 22 deletions
diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c index 617a1e5694c1..de4247021d25 100644 --- a/fs/jffs2/compr.c +++ b/fs/jffs2/compr.c | |||
@@ -103,7 +103,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
103 | spin_unlock(&jffs2_compressor_list_lock); | 103 | spin_unlock(&jffs2_compressor_list_lock); |
104 | *datalen = orig_slen; | 104 | *datalen = orig_slen; |
105 | *cdatalen = orig_dlen; | 105 | *cdatalen = orig_dlen; |
106 | compr_ret = this->compress(data_in, output_buf, datalen, cdatalen, NULL); | 106 | compr_ret = this->compress(data_in, output_buf, datalen, cdatalen); |
107 | spin_lock(&jffs2_compressor_list_lock); | 107 | spin_lock(&jffs2_compressor_list_lock); |
108 | this->usecount--; | 108 | this->usecount--; |
109 | if (!compr_ret) { | 109 | if (!compr_ret) { |
@@ -152,7 +152,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
152 | spin_unlock(&jffs2_compressor_list_lock); | 152 | spin_unlock(&jffs2_compressor_list_lock); |
153 | *datalen = orig_slen; | 153 | *datalen = orig_slen; |
154 | *cdatalen = orig_dlen; | 154 | *cdatalen = orig_dlen; |
155 | compr_ret = this->compress(data_in, this->compr_buf, datalen, cdatalen, NULL); | 155 | compr_ret = this->compress(data_in, this->compr_buf, datalen, cdatalen); |
156 | spin_lock(&jffs2_compressor_list_lock); | 156 | spin_lock(&jffs2_compressor_list_lock); |
157 | this->usecount--; | 157 | this->usecount--; |
158 | if (!compr_ret) { | 158 | if (!compr_ret) { |
@@ -220,7 +220,7 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
220 | if (comprtype == this->compr) { | 220 | if (comprtype == this->compr) { |
221 | this->usecount++; | 221 | this->usecount++; |
222 | spin_unlock(&jffs2_compressor_list_lock); | 222 | spin_unlock(&jffs2_compressor_list_lock); |
223 | ret = this->decompress(cdata_in, data_out, cdatalen, datalen, NULL); | 223 | ret = this->decompress(cdata_in, data_out, cdatalen, datalen); |
224 | spin_lock(&jffs2_compressor_list_lock); | 224 | spin_lock(&jffs2_compressor_list_lock); |
225 | if (ret) { | 225 | if (ret) { |
226 | printk(KERN_WARNING "Decompressor \"%s\" returned %d\n", this->name, ret); | 226 | printk(KERN_WARNING "Decompressor \"%s\" returned %d\n", this->name, ret); |
diff --git a/fs/jffs2/compr.h b/fs/jffs2/compr.h index e471a9106fd9..13bb7597ab39 100644 --- a/fs/jffs2/compr.h +++ b/fs/jffs2/compr.h | |||
@@ -49,9 +49,9 @@ struct jffs2_compressor { | |||
49 | char *name; | 49 | char *name; |
50 | char compr; /* JFFS2_COMPR_XXX */ | 50 | char compr; /* JFFS2_COMPR_XXX */ |
51 | int (*compress)(unsigned char *data_in, unsigned char *cpage_out, | 51 | int (*compress)(unsigned char *data_in, unsigned char *cpage_out, |
52 | uint32_t *srclen, uint32_t *destlen, void *model); | 52 | uint32_t *srclen, uint32_t *destlen); |
53 | int (*decompress)(unsigned char *cdata_in, unsigned char *data_out, | 53 | int (*decompress)(unsigned char *cdata_in, unsigned char *data_out, |
54 | uint32_t cdatalen, uint32_t datalen, void *model); | 54 | uint32_t cdatalen, uint32_t datalen); |
55 | int usecount; | 55 | int usecount; |
56 | int disabled; /* if set the compressor won't compress */ | 56 | int disabled; /* if set the compressor won't compress */ |
57 | unsigned char *compr_buf; /* used by size compr. mode */ | 57 | unsigned char *compr_buf; /* used by size compr. mode */ |
diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index ed25ae7c98eb..af186ee674d8 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c | |||
@@ -42,7 +42,7 @@ static int __init alloc_workspace(void) | |||
42 | } | 42 | } |
43 | 43 | ||
44 | static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, | 44 | static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, |
45 | uint32_t *sourcelen, uint32_t *dstlen, void *model) | 45 | uint32_t *sourcelen, uint32_t *dstlen) |
46 | { | 46 | { |
47 | size_t compress_size; | 47 | size_t compress_size; |
48 | int ret; | 48 | int ret; |
@@ -67,7 +67,7 @@ static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, | |||
67 | } | 67 | } |
68 | 68 | ||
69 | static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, | 69 | static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, |
70 | uint32_t srclen, uint32_t destlen, void *model) | 70 | uint32_t srclen, uint32_t destlen) |
71 | { | 71 | { |
72 | size_t dl = destlen; | 72 | size_t dl = destlen; |
73 | int ret; | 73 | int ret; |
diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index 9696ad9ef5f7..16a5047903a6 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c | |||
@@ -31,8 +31,7 @@ | |||
31 | /* _compress returns the compressed size, -1 if bigger */ | 31 | /* _compress returns the compressed size, -1 if bigger */ |
32 | static int jffs2_rtime_compress(unsigned char *data_in, | 32 | static int jffs2_rtime_compress(unsigned char *data_in, |
33 | unsigned char *cpage_out, | 33 | unsigned char *cpage_out, |
34 | uint32_t *sourcelen, uint32_t *dstlen, | 34 | uint32_t *sourcelen, uint32_t *dstlen) |
35 | void *model) | ||
36 | { | 35 | { |
37 | short positions[256]; | 36 | short positions[256]; |
38 | int outpos = 0; | 37 | int outpos = 0; |
@@ -73,8 +72,7 @@ static int jffs2_rtime_compress(unsigned char *data_in, | |||
73 | 72 | ||
74 | static int jffs2_rtime_decompress(unsigned char *data_in, | 73 | static int jffs2_rtime_decompress(unsigned char *data_in, |
75 | unsigned char *cpage_out, | 74 | unsigned char *cpage_out, |
76 | uint32_t srclen, uint32_t destlen, | 75 | uint32_t srclen, uint32_t destlen) |
77 | void *model) | ||
78 | { | 76 | { |
79 | short positions[256]; | 77 | short positions[256]; |
80 | int outpos = 0; | 78 | int outpos = 0; |
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index a12b4f763373..9e7cec808c4c 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c | |||
@@ -298,7 +298,7 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in, | |||
298 | #if 0 | 298 | #if 0 |
299 | /* _compress returns the compressed size, -1 if bigger */ | 299 | /* _compress returns the compressed size, -1 if bigger */ |
300 | int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out, | 300 | int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out, |
301 | uint32_t *sourcelen, uint32_t *dstlen, void *model) | 301 | uint32_t *sourcelen, uint32_t *dstlen) |
302 | { | 302 | { |
303 | return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, | 303 | return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, |
304 | cpage_out, sourcelen, dstlen); | 304 | cpage_out, sourcelen, dstlen); |
@@ -306,8 +306,7 @@ int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out, | |||
306 | #endif | 306 | #endif |
307 | static int jffs2_dynrubin_compress(unsigned char *data_in, | 307 | static int jffs2_dynrubin_compress(unsigned char *data_in, |
308 | unsigned char *cpage_out, | 308 | unsigned char *cpage_out, |
309 | uint32_t *sourcelen, uint32_t *dstlen, | 309 | uint32_t *sourcelen, uint32_t *dstlen) |
310 | void *model) | ||
311 | { | 310 | { |
312 | int bits[8]; | 311 | int bits[8]; |
313 | unsigned char histo[256]; | 312 | unsigned char histo[256]; |
@@ -387,8 +386,7 @@ static void rubin_do_decompress(int bit_divider, int *bits, | |||
387 | 386 | ||
388 | static int jffs2_rubinmips_decompress(unsigned char *data_in, | 387 | static int jffs2_rubinmips_decompress(unsigned char *data_in, |
389 | unsigned char *cpage_out, | 388 | unsigned char *cpage_out, |
390 | uint32_t sourcelen, uint32_t dstlen, | 389 | uint32_t sourcelen, uint32_t dstlen) |
391 | void *model) | ||
392 | { | 390 | { |
393 | rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, | 391 | rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, |
394 | cpage_out, sourcelen, dstlen); | 392 | cpage_out, sourcelen, dstlen); |
@@ -397,8 +395,7 @@ static int jffs2_rubinmips_decompress(unsigned char *data_in, | |||
397 | 395 | ||
398 | static int jffs2_dynrubin_decompress(unsigned char *data_in, | 396 | static int jffs2_dynrubin_decompress(unsigned char *data_in, |
399 | unsigned char *cpage_out, | 397 | unsigned char *cpage_out, |
400 | uint32_t sourcelen, uint32_t dstlen, | 398 | uint32_t sourcelen, uint32_t dstlen) |
401 | void *model) | ||
402 | { | 399 | { |
403 | int bits[8]; | 400 | int bits[8]; |
404 | int c; | 401 | int c; |
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 97fc45de6f81..fd05a0b9431d 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -68,8 +68,7 @@ static void free_workspaces(void) | |||
68 | 68 | ||
69 | static int jffs2_zlib_compress(unsigned char *data_in, | 69 | static int jffs2_zlib_compress(unsigned char *data_in, |
70 | unsigned char *cpage_out, | 70 | unsigned char *cpage_out, |
71 | uint32_t *sourcelen, uint32_t *dstlen, | 71 | uint32_t *sourcelen, uint32_t *dstlen) |
72 | void *model) | ||
73 | { | 72 | { |
74 | int ret; | 73 | int ret; |
75 | 74 | ||
@@ -136,8 +135,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, | |||
136 | 135 | ||
137 | static int jffs2_zlib_decompress(unsigned char *data_in, | 136 | static int jffs2_zlib_decompress(unsigned char *data_in, |
138 | unsigned char *cpage_out, | 137 | unsigned char *cpage_out, |
139 | uint32_t srclen, uint32_t destlen, | 138 | uint32_t srclen, uint32_t destlen) |
140 | void *model) | ||
141 | { | 139 | { |
142 | int ret; | 140 | int ret; |
143 | int wbits = MAX_WBITS; | 141 | int wbits = MAX_WBITS; |