]> git.baikalelectronics.ru Git - kernel.git/commit
z3fold: simplify the zhdr initialization code in init_z3fold_page()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 24 Feb 2021 20:09:22 +0000 (12:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:34 +0000 (13:38 -0800)
commita9ee2ef801d25cf07bd6f253386c95f7b4d0e631
tree74773ceb5fb7d8d599ff97aa9bd2bb89bd2d2881
parent990acb6394d47082a470ffe9c1a7679335a823c6
z3fold: simplify the zhdr initialization code in init_z3fold_page()

We can simplify the zhdr initialization by memset() the zhdr first
instead of set struct member to zero one by one.  This would also make
code more compact and clear.

Link: https://lkml.kernel.org/r/20210120085851.16159-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/z3fold.c