Commit 088bd455 authored by Mike Frysinger's avatar Mike Frysinger Committed by David Woodhouse

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: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent d0f7959e
...@@ -103,7 +103,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, ...@@ -103,7 +103,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
spin_unlock(&jffs2_compressor_list_lock); spin_unlock(&jffs2_compressor_list_lock);
*datalen = orig_slen; *datalen = orig_slen;
*cdatalen = orig_dlen; *cdatalen = orig_dlen;
compr_ret = this->compress(data_in, output_buf, datalen, cdatalen, NULL); compr_ret = this->compress(data_in, output_buf, datalen, cdatalen);
spin_lock(&jffs2_compressor_list_lock); spin_lock(&jffs2_compressor_list_lock);
this->usecount--; this->usecount--;
if (!compr_ret) { if (!compr_ret) {
...@@ -152,7 +152,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, ...@@ -152,7 +152,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
spin_unlock(&jffs2_compressor_list_lock); spin_unlock(&jffs2_compressor_list_lock);
*datalen = orig_slen; *datalen = orig_slen;
*cdatalen = orig_dlen; *cdatalen = orig_dlen;
compr_ret = this->compress(data_in, this->compr_buf, datalen, cdatalen, NULL); compr_ret = this->compress(data_in, this->compr_buf, datalen, cdatalen);
spin_lock(&jffs2_compressor_list_lock); spin_lock(&jffs2_compressor_list_lock);
this->usecount--; this->usecount--;
if (!compr_ret) { if (!compr_ret) {
...@@ -220,7 +220,7 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f, ...@@ -220,7 +220,7 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
if (comprtype == this->compr) { if (comprtype == this->compr) {
this->usecount++; this->usecount++;
spin_unlock(&jffs2_compressor_list_lock); spin_unlock(&jffs2_compressor_list_lock);
ret = this->decompress(cdata_in, data_out, cdatalen, datalen, NULL); ret = this->decompress(cdata_in, data_out, cdatalen, datalen);
spin_lock(&jffs2_compressor_list_lock); spin_lock(&jffs2_compressor_list_lock);
if (ret) { if (ret) {
printk(KERN_WARNING "Decompressor \"%s\" returned %d\n", this->name, ret); printk(KERN_WARNING "Decompressor \"%s\" returned %d\n", this->name, ret);
......
...@@ -49,9 +49,9 @@ struct jffs2_compressor { ...@@ -49,9 +49,9 @@ struct jffs2_compressor {
char *name; char *name;
char compr; /* JFFS2_COMPR_XXX */ char compr; /* JFFS2_COMPR_XXX */
int (*compress)(unsigned char *data_in, unsigned char *cpage_out, int (*compress)(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *srclen, uint32_t *destlen, void *model); uint32_t *srclen, uint32_t *destlen);
int (*decompress)(unsigned char *cdata_in, unsigned char *data_out, int (*decompress)(unsigned char *cdata_in, unsigned char *data_out,
uint32_t cdatalen, uint32_t datalen, void *model); uint32_t cdatalen, uint32_t datalen);
int usecount; int usecount;
int disabled; /* if set the compressor won't compress */ int disabled; /* if set the compressor won't compress */
unsigned char *compr_buf; /* used by size compr. mode */ unsigned char *compr_buf; /* used by size compr. mode */
......
...@@ -42,7 +42,7 @@ static int __init alloc_workspace(void) ...@@ -42,7 +42,7 @@ static int __init alloc_workspace(void)
} }
static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, void *model) uint32_t *sourcelen, uint32_t *dstlen)
{ {
size_t compress_size; size_t compress_size;
int ret; int ret;
...@@ -67,7 +67,7 @@ static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, ...@@ -67,7 +67,7 @@ static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out,
} }
static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen, void *model) uint32_t srclen, uint32_t destlen)
{ {
size_t dl = destlen; size_t dl = destlen;
int ret; int ret;
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
/* _compress returns the compressed size, -1 if bigger */ /* _compress returns the compressed size, -1 if bigger */
static int jffs2_rtime_compress(unsigned char *data_in, static int jffs2_rtime_compress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, uint32_t *sourcelen, uint32_t *dstlen)
void *model)
{ {
short positions[256]; short positions[256];
int outpos = 0; int outpos = 0;
...@@ -73,8 +72,7 @@ static int jffs2_rtime_compress(unsigned char *data_in, ...@@ -73,8 +72,7 @@ static int jffs2_rtime_compress(unsigned char *data_in,
static int jffs2_rtime_decompress(unsigned char *data_in, static int jffs2_rtime_decompress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen, uint32_t srclen, uint32_t destlen)
void *model)
{ {
short positions[256]; short positions[256];
int outpos = 0; int outpos = 0;
......
...@@ -298,7 +298,7 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in, ...@@ -298,7 +298,7 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in,
#if 0 #if 0
/* _compress returns the compressed size, -1 if bigger */ /* _compress returns the compressed size, -1 if bigger */
int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out, int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, void *model) uint32_t *sourcelen, uint32_t *dstlen)
{ {
return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in,
cpage_out, sourcelen, dstlen); cpage_out, sourcelen, dstlen);
...@@ -306,8 +306,7 @@ int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out, ...@@ -306,8 +306,7 @@ int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out,
#endif #endif
static int jffs2_dynrubin_compress(unsigned char *data_in, static int jffs2_dynrubin_compress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, uint32_t *sourcelen, uint32_t *dstlen)
void *model)
{ {
int bits[8]; int bits[8];
unsigned char histo[256]; unsigned char histo[256];
...@@ -387,8 +386,7 @@ static void rubin_do_decompress(int bit_divider, int *bits, ...@@ -387,8 +386,7 @@ static void rubin_do_decompress(int bit_divider, int *bits,
static int jffs2_rubinmips_decompress(unsigned char *data_in, static int jffs2_rubinmips_decompress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen, uint32_t sourcelen, uint32_t dstlen)
void *model)
{ {
rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in,
cpage_out, sourcelen, dstlen); cpage_out, sourcelen, dstlen);
...@@ -397,8 +395,7 @@ static int jffs2_rubinmips_decompress(unsigned char *data_in, ...@@ -397,8 +395,7 @@ static int jffs2_rubinmips_decompress(unsigned char *data_in,
static int jffs2_dynrubin_decompress(unsigned char *data_in, static int jffs2_dynrubin_decompress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t sourcelen, uint32_t dstlen, uint32_t sourcelen, uint32_t dstlen)
void *model)
{ {
int bits[8]; int bits[8];
int c; int c;
......
...@@ -68,8 +68,7 @@ static void free_workspaces(void) ...@@ -68,8 +68,7 @@ static void free_workspaces(void)
static int jffs2_zlib_compress(unsigned char *data_in, static int jffs2_zlib_compress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, uint32_t *sourcelen, uint32_t *dstlen)
void *model)
{ {
int ret; int ret;
...@@ -136,8 +135,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, ...@@ -136,8 +135,7 @@ static int jffs2_zlib_compress(unsigned char *data_in,
static int jffs2_zlib_decompress(unsigned char *data_in, static int jffs2_zlib_decompress(unsigned char *data_in,
unsigned char *cpage_out, unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen, uint32_t srclen, uint32_t destlen)
void *model)
{ {
int ret; int ret;
int wbits = MAX_WBITS; int wbits = MAX_WBITS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment