linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] of: overlay: Small cleanups
@ 2018-03-09 10:44 Geert Uytterhoeven
  2018-03-09 10:44 ` [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply() Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-03-09 10:44 UTC (permalink / raw)
  To: Pantelis Antoniou, Rob Herring, Mark Rutland, Frank Rowand
  Cc: devicetree, linux-kernel, Geert Uytterhoeven

	Hi all,

This patch series contains two forgotten updates for the recent
conversion to FDT overlays, and removes a function that was never used
(not even in out-of-tree overlay ConfigFS ;-).

Geert Uytterhoeven (3):
  of: Documentation: Fix forgotten reference to of_overlay_apply()
  of: overlay: Fix forgotten reference to of_overlay_apply()
  of: overlay: Remove unused of_overlay_remove_all()

 Documentation/devicetree/overlay-notes.txt |  8 ++------
 drivers/of/overlay.c                       | 25 +------------------------
 include/linux/of.h                         |  6 ------
 3 files changed, 3 insertions(+), 36 deletions(-)

-- 
2.7.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply()
  2018-03-09 10:44 [PATCH 0/3] of: overlay: Small cleanups Geert Uytterhoeven
@ 2018-03-09 10:44 ` Geert Uytterhoeven
  2018-03-18 12:48   ` Rob Herring
  2018-03-09 10:44 ` [PATCH 2/3] of: overlay: " Geert Uytterhoeven
  2018-03-09 10:44 ` [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all() Geert Uytterhoeven
  2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-03-09 10:44 UTC (permalink / raw)
  To: Pantelis Antoniou, Rob Herring, Mark Rutland, Frank Rowand
  Cc: devicetree, linux-kernel, Geert Uytterhoeven

Fixes: 93a6039000b5acab ("of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/devicetree/overlay-notes.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt
index 5175a24d387ec1a1..a4feb6dde8cd08e8 100644
--- a/Documentation/devicetree/overlay-notes.txt
+++ b/Documentation/devicetree/overlay-notes.txt
@@ -91,8 +91,8 @@ The API is quite easy to use.
 return value is an error or a cookie identifying this overlay.
 
 2. Call of_overlay_remove() to remove and cleanup the overlay changeset
-previously created via the call to of_overlay_apply(). Removal of an overlay
-changeset that is stacked by another will not be permitted.
+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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] of: overlay: Fix forgotten reference to of_overlay_apply()
  2018-03-09 10:44 [PATCH 0/3] of: overlay: Small cleanups Geert Uytterhoeven
  2018-03-09 10:44 ` [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply() Geert Uytterhoeven
@ 2018-03-09 10:44 ` Geert Uytterhoeven
  2018-03-18 12:48   ` Rob Herring
  2018-03-09 10:44 ` [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all() Geert Uytterhoeven
  2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-03-09 10:44 UTC (permalink / raw)
  To: Pantelis Antoniou, Rob Herring, Mark Rutland, Frank Rowand
  Cc: devicetree, linux-kernel, Geert Uytterhoeven

While technically the ovcs_id is still returned by of_overlay_apply(),
this is an internal function.  All public callers of of_overlay_remove()
pass an ovcs_id returned by the public function of_overlay_fdt_apply().

Fixes: 39a751a4cb7e4798 ("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
The single internal caller is of_overlay_remove_all().
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index b930e05d121574ad..dbdeef5a12863ac3 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -958,7 +958,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
  * @ovcs_id:	Pointer to overlay changeset id
  *
  * Removes an overlay if it is permissible.  @ovcs_id was previously returned
- * by of_overlay_apply().
+ * by of_overlay_fdt_apply().
  *
  * If an error occurred while attempting to revert the overlay changeset,
  * then an attempt is made to re-apply any changeset entry that was
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all()
  2018-03-09 10:44 [PATCH 0/3] of: overlay: Small cleanups Geert Uytterhoeven
  2018-03-09 10:44 ` [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply() Geert Uytterhoeven
  2018-03-09 10:44 ` [PATCH 2/3] of: overlay: " Geert Uytterhoeven
@ 2018-03-09 10:44 ` Geert Uytterhoeven
  2018-03-18 12:48   ` Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-03-09 10:44 UTC (permalink / raw)
  To: Pantelis Antoniou, Rob Herring, Mark Rutland, Frank Rowand
  Cc: devicetree, linux-kernel, Geert Uytterhoeven

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(-)

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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all()
  2018-03-09 10:44 ` [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all() Geert Uytterhoeven
@ 2018-03-18 12:48   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-03-18 12:48 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pantelis Antoniou, Mark Rutland, Frank Rowand, devicetree, linux-kernel

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(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply()
  2018-03-09 10:44 ` [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply() Geert Uytterhoeven
@ 2018-03-18 12:48   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-03-18 12:48 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pantelis Antoniou, Mark Rutland, Frank Rowand, devicetree, linux-kernel

On Fri, Mar 09, 2018 at 11:44:46AM +0100, Geert Uytterhoeven wrote:
> Fixes: 93a6039000b5acab ("of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  Documentation/devicetree/overlay-notes.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] of: overlay: Fix forgotten reference to of_overlay_apply()
  2018-03-09 10:44 ` [PATCH 2/3] of: overlay: " Geert Uytterhoeven
@ 2018-03-18 12:48   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-03-18 12:48 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pantelis Antoniou, Mark Rutland, Frank Rowand, devicetree, linux-kernel

On Fri, Mar 09, 2018 at 11:44:47AM +0100, Geert Uytterhoeven wrote:
> While technically the ovcs_id is still returned by of_overlay_apply(),
> this is an internal function.  All public callers of of_overlay_remove()
> pass an ovcs_id returned by the public function of_overlay_fdt_apply().
> 
> Fixes: 39a751a4cb7e4798 ("of: change overlay apply input data from unflattened to FDT")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> The single internal caller is of_overlay_remove_all().
> ---
>  drivers/of/overlay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-18 12:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09 10:44 [PATCH 0/3] of: overlay: Small cleanups Geert Uytterhoeven
2018-03-09 10:44 ` [PATCH 1/3] of: Documentation: Fix forgotten reference to of_overlay_apply() Geert Uytterhoeven
2018-03-18 12:48   ` Rob Herring
2018-03-09 10:44 ` [PATCH 2/3] of: overlay: " Geert Uytterhoeven
2018-03-18 12:48   ` Rob Herring
2018-03-09 10:44 ` [PATCH 3/3] of: overlay: Remove unused of_overlay_remove_all() Geert Uytterhoeven
2018-03-18 12:48   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).