@@ -149,7 +149,7 @@ static void jffs2_decompression_test(struct jffs2_compressor *compr,
jffs2_error_cnt++;
return;
}
- if (compr->decompress(output_buf,jffs2_compression_check_buf,cdatalen,datalen,NULL)) {
+ if (compr->decompress(output_buf,jffs2_compression_check_buf,cdatalen,datalen)) {
fprintf(stderr,"JFFS2 compression check: decompression failed at %s.\n", compr->name);
jffs2_error_cnt++;
}
@@ -243,7 +243,7 @@ uint16_t jffs2_compress( unsigned char *data_in, unsigned char **cpage_out,
*datalen = orig_slen;
*cdatalen = orig_dlen;
- compr_ret = this->compress(data_in, output_buf, datalen, cdatalen, NULL);
+ compr_ret = this->compress(data_in, output_buf, datalen, cdatalen);
this->usecount--;
if (!compr_ret) {
ret = this->compr;
@@ -294,7 +294,7 @@ uint16_t jffs2_compress( unsigned char *data_in, unsigned char **cpage_out,
jffs2_decompression_test_prepare(this->compr_buf,this->compr_buf_size);
*datalen = orig_slen;
*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);
this->usecount--;
if (!compr_ret) {
if (jffs2_compression_check)
@@ -70,9 +70,9 @@ struct jffs2_compressor {
const char *name;
char compr; /* JFFS2_COMPR_XXX */
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,
- uint32_t cdatalen, uint32_t datalen, void *model);
+ uint32_t cdatalen, uint32_t datalen);
int usecount;
int disabled; /* if seted the compressor won't compress */
unsigned char *compr_buf; /* used by size compr. mode */
@@ -46,7 +46,7 @@ static void *lzo_compress_buf;
*
*/
static int jffs2_lzo_cmpr(unsigned char *data_in, unsigned char *cpage_out,
- uint32_t *sourcelen, uint32_t *dstlen, void *model)
+ uint32_t *sourcelen, uint32_t *dstlen)
{
lzo_uint compress_size;
int ret;
@@ -66,7 +66,7 @@ static int jffs2_lzo_cmpr(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)
{
int ret;
lzo_uint dl;
@@ -24,7 +24,7 @@
/* _compress returns the compressed size, -1 if bigger */
static int jffs2_rtime_compress(unsigned char *data_in, unsigned char *cpage_out,
- uint32_t *sourcelen, uint32_t *dstlen, void *model)
+ uint32_t *sourcelen, uint32_t *dstlen)
{
short positions[256];
int outpos = 0;
@@ -64,7 +64,7 @@ static int jffs2_rtime_compress(unsigned char *data_in, unsigned char *cpage_out
static int jffs2_rtime_decompress(unsigned char *data_in, unsigned char *cpage_out,
- uint32_t srclen, uint32_t destlen, void *model)
+ uint32_t srclen, uint32_t destlen)
{
short positions[256];
int outpos = 0;
@@ -53,7 +53,7 @@ Q: Is 12 bytes sufficient?
#define STREAM_END_SPACE 12
static int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out,
- uint32_t *sourcelen, uint32_t *dstlen, void *model)
+ uint32_t *sourcelen, uint32_t *dstlen)
{
z_stream strm;
int ret;
@@ -101,7 +101,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out,
}
static int jffs2_zlib_decompress(unsigned char *data_in, unsigned char *cpage_out,
- uint32_t srclen, uint32_t destlen, void *model)
+ uint32_t srclen, uint32_t destlen)
{
z_stream strm;
int ret;
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> --- compr.c | 6 +++--- compr.h | 4 ++-- compr_lzo.c | 4 ++-- compr_rtime.c | 4 ++-- compr_zlib.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-)