Skip to contentSkip to conversation

dm: remove dm_set_md_type()

PATCH In review Li Lingfeng 1 participant 2 messages Sep 12, 2023 – Oct 28, 2023 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: remove dm_set_md_type()

Commit ba30585936b0 ("dm: move setting md->type into dm_setup_md_queue") has removed the only reference to dm_set_md_type(), so remove dm_set_md_type() now.

---
 drivers/md/dm.c | 6 ------
 drivers/md/dm.h | 1 -
 2 files changed, 7 deletions(-)
drivers/md/dm.c +0 -6
index f0f118ab20fa..6b9d04ca09d0 100644
@@ -2316,12 +2316,6 @@ void dm_unlock_md_type(struct mapped_device *md)
 	mutex_unlock(&md->type_lock);
 }
 
-void dm_set_md_type(struct mapped_device *md, enum dm_queue_mode type)
-{
-	BUG_ON(!mutex_is_locked(&md->type_lock));
-	md->type = type;
-}
-
 enum dm_queue_mode dm_get_md_type(struct mapped_device *md)
 {
 	return md->type;
drivers/md/dm.h +0 -1
index f682295af91f..cc55ef3441be 100644
@@ -76,7 +76,6 @@ bool dm_table_request_based(struct dm_table *t);
 
 void dm_lock_md_type(struct mapped_device *md);
 void dm_unlock_md_type(struct mapped_device *md);
-void dm_set_md_type(struct mapped_device *md, enum dm_queue_mode type);
 enum dm_queue_mode dm_get_md_type(struct mapped_device *md);
 struct target_type *dm_get_immutable_target_type(struct mapped_device *md);
 
Signature · 1 line
2.31.1
#1 lore raw

Friendly ping ...

Thanks

Quoted 39 lines · Li Lingfeng

Commit ba30585936b0 ("dm: move setting md->type into dm_setup_md_queue") has removed the only reference to dm_set_md_type(), so remove dm_set_md_type() now.

---
  drivers/md/dm.c | 6 ------
  drivers/md/dm.h | 1 -
  2 files changed, 7 deletions(-)
drivers/md/dm.c +0 -6
index f0f118ab20fa..6b9d04ca09d0 100644
@@ -2316,12 +2316,6 @@ void dm_unlock_md_type(struct mapped_device *md)
  	mutex_unlock(&md->type_lock);
  }
 
-void dm_set_md_type(struct mapped_device *md, enum dm_queue_mode type)
-{
-	BUG_ON(!mutex_is_locked(&md->type_lock));
-	md->type = type;
-}
-
  enum dm_queue_mode dm_get_md_type(struct mapped_device *md)
  {
  	return md->type;
drivers/md/dm.h +0 -1
index f682295af91f..cc55ef3441be 100644
@@ -76,7 +76,6 @@ bool dm_table_request_based(struct dm_table *t);
 
  void dm_lock_md_type(struct mapped_device *md);
  void dm_unlock_md_type(struct mapped_device *md);
-void dm_set_md_type(struct mapped_device *md, enum dm_queue_mode type);
  enum dm_queue_mode dm_get_md_type(struct mapped_device *md);
  struct target_type *dm_get_immutable_target_type(struct mapped_device *md);