Skip to contentSkip to conversation

dm btree: make symbol 'shadow_child' static

PATCH New Zou Wei 1 participant 1 message May 21, 2021 Device mapper

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 dm btree: make symbol 'shadow_child' static

The sparse tool complains as follows:

drivers/md/persistent-data/dm-btree.c:696:5: warning:
symbol 'shadow_child' was not declared. Should it be static?

This symbol is not used outside of dm-btree.c, so marks it static.

---
 drivers/md/persistent-data/dm-btree.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/md/persistent-data/dm-btree.c +4 -2
index b8d21b6..a29bcb8 100644
@@ -693,8 +693,10 @@ static int split_one_into_two(struct shadow_spine *s, unsigned parent_index,
  * child of the given parent node.  Making sure to update the parent to point
  * to the new shadow.
  */
-int shadow_child(struct dm_btree_info *info, struct dm_btree_value_type *vt,
-		 struct btree_node *parent, unsigned index, struct dm_block **result)
+static int shadow_child(struct dm_btree_info *info,
+			struct dm_btree_value_type *vt,
+			struct btree_node *parent,
+			unsigned index, struct dm_block **result)
 {
 	int r, inc;
 	dm_block_t root;
Signature · 1 line
2.6.2