]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: use the preferred form for passing the size of a structure type
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 13 Oct 2020 23:52:39 +0000 (16:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:30 +0000 (18:38 -0700)
commit9a0837e496ebdc1c379b5cec7b2123312e2c4552
treea1bc174f31cd14339b6408ba9c53c5bfb288e67e
parent1de60264c595ffafca1638dd91894d314157b772
mm: memcontrol: use the preferred form for passing the size of a structure type

Use the preferred form for passing the size of a structure type.  The
alternative form where the structure type is spelled out hurts readability
and introduces an opportunity for a bug when the object type is changed
but the corresponding object identifier to which the sizeof operator is
applied is not.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Link: https://lkml.kernel.org/r/773e013ff2f07fe2a0b47153f14dea054c0c04f1.1596214831.git.gustavoars@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c