Update some comments.
Signed-off-by: Yang Shen shenyang39@huawei.com --- include/wd_comp.h | 20 ++++++++++---------- wd_comp.c | 3 +-- 2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/include/wd_comp.h b/include/wd_comp.h index 45b0d0b..45994ff 100644 --- a/include/wd_comp.h +++ b/include/wd_comp.h @@ -39,12 +39,12 @@ enum wd_comp_level { WD_COMP_L7, /* Compression level 7 */ WD_COMP_L8, /* Compression level 8 */ WD_COMP_L9, /* Compression level 9 */ - WD_COMP_L10, /* Compression level 10 */ - WD_COMP_L11, /* Compression level 11 */ - WD_COMP_L12, /* Compression level 12 */ - WD_COMP_L13, /* Compression level 13 */ - WD_COMP_L14, /* Compression level 14 */ - WD_COMP_L15, /* Compression level 15 */ + WD_COMP_L10, /* Compression level 10 */ + WD_COMP_L11, /* Compression level 11 */ + WD_COMP_L12, /* Compression level 12 */ + WD_COMP_L13, /* Compression level 13 */ + WD_COMP_L14, /* Compression level 14 */ + WD_COMP_L15, /* Compression level 15 */ };
enum wd_comp_winsz_type { @@ -72,10 +72,10 @@ struct wd_comp_req { __u32 dst_len; wd_alg_comp_cb_t *cb; void *cb_param; - enum wd_comp_op_type op_type; /* Denoted by wd_comp_op_type */ - enum wd_buff_type data_fmt; /* Denoted by wd_buff_type */ - __u32 last; - __u32 status; + enum wd_comp_op_type op_type; /* denoted by wd_comp_op_type */ + enum wd_buff_type data_fmt; /* denoted by wd_buff_type */ + __u32 last; /* flag of last block for stream mode */ + __u32 status; /* request error code */ void *priv; };
diff --git a/wd_comp.c b/wd_comp.c index 21c9928..6e71d35 100644 --- a/wd_comp.c +++ b/wd_comp.c @@ -494,7 +494,6 @@ static void fill_comp_msg(struct wd_comp_sess *sess, struct wd_comp_msg *msg, msg->win_sz = sess->win_sz; msg->avail_out = req->dst_len;
- /* if is last 1: flush end; other: sync flush */ msg->req.last = 1; }
@@ -722,7 +721,7 @@ static int append_store_block(struct wd_comp_sess *sess, memcpy(req->dst, store_block, blocksize); req->dst_len = blocksize; checksum = (__u32) cpu_to_be32(checksum); - /* if zlib, ADLER32 */ + /* if zlib, ADLER32 */ memcpy(req->dst + blocksize, &checksum, sizeof(checksum)); req->dst_len += sizeof(checksum); } else if (sess->alg_type == WD_GZIP) {