diff options
author | Mike Snitzer <snitzer@kernel.org> | 2022-07-05 20:00:36 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-07-07 17:49:33 +0200 |
commit | 2aec377a29250b942f14d3c16d49783da3e9df11 (patch) | |
tree | 6deeee9da1656b677617f7de3ef954e2f2d257cf /drivers/md/dm-zone.c | |
parent | dm: add two stage requeue mechanism (diff) | |
download | linux-2aec377a29250b942f14d3c16d49783da3e9df11.tar.xz linux-2aec377a29250b942f14d3c16d49783da3e9df11.zip |
dm table: remove dm_table_get_num_targets() wrapper
More efficient and readable to just access table->num_targets directly.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-zone.c')
-rw-r--r-- | drivers/md/dm-zone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c index 3e7b1fe1580b..16dc9ec4bb11 100644 --- a/drivers/md/dm-zone.c +++ b/drivers/md/dm-zone.c @@ -278,7 +278,7 @@ static bool dm_table_supports_zone_append(struct dm_table *t) struct dm_target *ti; unsigned int i; - for (i = 0; i < dm_table_get_num_targets(t); i++) { + for (i = 0; i < t->num_targets; i++) { ti = dm_table_get_target(t, i); if (ti->emulate_zone_append) |