]> git.baikalelectronics.ru Git - kernel.git/commit
mm/damon/core: copy struct-to-struct instead of field-to-field in damon_new_scheme()
authorSeongJae Park <sj@kernel.org>
Tue, 13 Sep 2022 17:44:30 +0000 (17:44 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:10 +0000 (14:03 -0700)
commit02f17037fc6e38ca1c00ac87a112372a3867ba45
treebcbe406556a42562bb411fdab90d76a44509920c
parent8193321ac90d525b33815c77faae7d2d12042c03
mm/damon/core: copy struct-to-struct instead of field-to-field in damon_new_scheme()

The function for new 'struct damos' creation, 'damon_new_scheme()', copies
each field of the struct one by one, though it could simply copied via
struct to struct.  This commit replaces the unnecessarily verbose
field-to-field copies with struct-to-struct copies to make code simple and
short.

Link: https://lkml.kernel.org/r/20220913174449.50645-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c