Commit 0227af35 authored by Akhilesh Patil's avatar Akhilesh Patil Committed by Jens Axboe
Browse files

selftests: ublk: Use ARRAY_SIZE() macro to improve code



Use ARRAY_SIZE() macro while calculating size of an array to improve
code readability and reduce potential sizing errors.
Implement this suggestion given by spatch tool by running
coccinelle script - scripts/coccinelle/misc/array_size.cocci
Follow ARRAY_SIZE() macro usage pattern in ublk.c introduced by,
commit ec120093 ("selftests: ublk: fix ublk_find_tgt()")
wherever appropriate to maintain consistency.

Signed-off-by: default avatarAkhilesh Patil <akhilesh@ee.iitb.ac.in>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/aKGihYui6/Pcijbk@bhairav-test.ee.iitb.ac.in


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8f5845e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment