]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: movinggc: Use struct_size() helper in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Sat, 25 Jul 2020 12:00:19 +0000 (20:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 13:38:20 +0000 (07:38 -0600)
commit25d023365ea84dff5b16423e89d0855a27042017
tree4058a1ec78c0ac0a89bd1441df33ad9cca0e839f
parenteb14999c2226e58f63926266043f2363a91e4096
bcache: movinggc: Use struct_size() helper in kzalloc()

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/movinggc.c