]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: Use struct_size() in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Sat, 25 Jul 2020 12:00:20 +0000 (20:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 13:38:20 +0000 (07:38 -0600)
commit0343b1626cb47e04c374a71ffa2d6f4678b80a68
tree6643613d2f2c57424832af77742b92bb480dd3a7
parentaeda8e9e18f93a7c1c7cff224c0db4489accabcd
bcache: Use struct_size() 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/writeback.c