aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2022-07-05 16:12:27 -0400
committerMike Snitzer <snitzer@kernel.org>2022-07-07 11:49:34 -0400
commit564b5c5476cdb71b717340897b2b50f9c45df158 (patch)
tree75ff585908371d35a6142b3c8b9612c1cb8ac3a4 /drivers/md/dm.h
parentdm table: remove dm_table_get_num_targets() wrapper (diff)
downloadlinux-dev-564b5c5476cdb71b717340897b2b50f9c45df158.tar.xz
linux-dev-564b5c5476cdb71b717340897b2b50f9c45df158.zip
dm table: audit all dm_table_get_target() callers
All callers of dm_table_get_target() are expected to do proper bounds checking on the index they pass. Move dm_table_get_target() to dm-core.h to make it extra clear that only DM core code should be using it. Switch it to be inlined while at it. Standardize all DM core callers to use the same for loop pattern and make associated variables as local as possible. Rename some variables (e.g. s/table/t/ and s/tgt/ti/) along the way. Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r--drivers/md/dm.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 62816b647f82..5201df03ce40 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -53,7 +53,6 @@ struct dm_io;
*---------------------------------------------------------------*/
void dm_table_event_callback(struct dm_table *t,
void (*fn)(void *), void *context);
-struct dm_target *dm_table_get_target(struct dm_table *t, unsigned int index);
struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector);
bool dm_table_has_no_data_devices(struct dm_table *table);
int dm_calculate_queue_limits(struct dm_table *table,