lib/zlib: Split deflate and inflate states for DFLTCC
authorMikhail Zaslonko <zaslonko@linux.ibm.com>
Thu, 26 Jan 2023 13:14:26 +0000 (14:14 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:50:09 +0000 (22:50 -0800)
commit9fec9f8ea51c782d58a8b86f8e868fc06c782386
tree12df6a553a6eb2bdc0d61861462ae254eb6f44eb
parentcbf125408d1ca141cc1c3f8376e091e3cdde2cb2
lib/zlib: Split deflate and inflate states for DFLTCC

Currently deflate and inflate both use a common state struct. There are
several variables in this struct that we don't need for inflate, and
more may be coming in the future. Therefore split them in two separate
structs.
Apart from that, introduce separate headers for dfltcc_deflate and
dfltcc_inflate.

This commit is based on:
  https://github.com/zlib-ng/zlib-ng/commit/c592b1b

Link: https://lkml.kernel.org/r/20230126131428.1222214-7-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/zlib_deflate/deflate.c
lib/zlib_dfltcc/dfltcc.c
lib/zlib_dfltcc/dfltcc.h
lib/zlib_dfltcc/dfltcc_deflate.c
lib/zlib_dfltcc/dfltcc_deflate.h [new file with mode: 0644]
lib/zlib_dfltcc/dfltcc_inflate.c
lib/zlib_dfltcc/dfltcc_inflate.h [new file with mode: 0644]
lib/zlib_inflate/inflate.c