[3/3] of: overlay: Remove unused of_overlay_remove_all()

Message ID 1520592288-7680-4-git-send-email-geert+renesas@glider.be
State Rejected, archived
Headers show
Series
  • of: overlay: Small cleanups
Related show

Commit Message

Geert Uytterhoeven March 9, 2018, 10:44 a.m.
of_overlay_remove_all(), and its predecessor of_overlay_destroy_all(),
were never used.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/devicetree/overlay-notes.txt |  4 ----
 drivers/of/overlay.c                       | 23 -----------------------
 include/linux/of.h                         |  6 ------
 3 files changed, 33 deletions(-)

Comments

Rob Herring March 18, 2018, 12:48 p.m. | #1
On Fri, Mar 09, 2018 at 11:44:48AM +0100, Geert Uytterhoeven wrote:
> of_overlay_remove_all(), and its predecessor of_overlay_destroy_all(),
> were never used.

Maybe, but I think we should leave it. It's not that much and we'll just 
end up with open coded versions.

> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  Documentation/devicetree/overlay-notes.txt |  4 ----
>  drivers/of/overlay.c                       | 23 -----------------------
>  include/linux/of.h                         |  6 ------
>  3 files changed, 33 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
index a4feb6dde8cd08e8..b84452bfa6dafc62 100644
--- a/Documentation/devicetree/overlay-notes.txt
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -94,10 +94,6 @@  return value is an error or a cookie identifying this overlay.
 previously created via the call to of_overlay_fdt_apply(). Removal of an
 overlay changeset that is stacked by another will not be permitted.
 
-Finally, if you need to remove all overlays in one-go, just call
-of_overlay_remove_all() which will remove every single one in the correct
-order.
-
 Overlay DTS Format
 ------------------
 
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index dbdeef5a12863ac3..187d5fb4b111b6b0 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -1056,26 +1056,3 @@  int of_overlay_remove(int *ovcs_id)
 	return ret;
 }
 EXPORT_SYMBOL_GPL(of_overlay_remove);
-
-/**
- * of_overlay_remove_all() - Reverts and frees all overlay changesets
- *
- * Removes all overlays from the system in the correct order.
- *
- * Returns 0 on success, or a negative error number
- */
-int of_overlay_remove_all(void)
-{
-	struct overlay_changeset *ovcs, *ovcs_n;
-	int ret;
-
-	/* the tail of list is guaranteed to be safe to remove */
-	list_for_each_entry_safe_reverse(ovcs, ovcs_n, &ovcs_list, ovcs_list) {
-		ret = of_overlay_remove(&ovcs->id);
-		if (ret)
-			return ret;
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(of_overlay_remove_all);
diff --git a/include/linux/of.h b/include/linux/of.h
index 4d25e4f952d9bd4c..c6e3300950423ece 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -1374,7 +1374,6 @@  struct of_overlay_notify_data {
 int of_overlay_fdt_apply(const void *overlay_fdt, u32 overlay_fdt_size,
 			 int *ovcs_id);
 int of_overlay_remove(int *ovcs_id);
-int of_overlay_remove_all(void);
 
 int of_overlay_notifier_register(struct notifier_block *nb);
 int of_overlay_notifier_unregister(struct notifier_block *nb);
@@ -1391,11 +1390,6 @@  static inline int of_overlay_remove(int *ovcs_id)
 	return -ENOTSUPP;
 }
 
-static inline int of_overlay_remove_all(void)
-{
-	return -ENOTSUPP;
-}
-
 static inline int of_overlay_notifier_register(struct notifier_block *nb)
 {
 	return 0;