* [PATCH] of: overlay: Avoid spurious error messages in of_overlay_remove()
@ 2025-10-24 19:50 Christophe JAILLET
2025-10-27 18:48 ` Rob Herring (Arm)
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2025-10-24 19:50 UTC (permalink / raw)
To: Rob Herring, Saravana Kannan
Cc: andrea.porta, linux-kernel, kernel-janitors, Christophe JAILLET,
Dan Carpenter, devicetree
Make of_overlay_remove() tolerate ovcs_id being 0 without logging an error.
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This is needed for drivers/misc/rp1/rp1_pci.c where things are taken from
DT or at runtime. In the former case, ovcs_id is unused and left to 0.
Being able to tolerate such cases simplify error handling.
This was suggested by Dan as a reply to patch [1].
[1]: https://lore.kernel.org/lkml/4e92a271fdb98560c4e659556a1f3e99e7d0d38e.1760987458.git.christophe.jaillet@wanadoo.fr/
---
drivers/of/overlay.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 255e8362f600..5b4f42230e6c 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -1190,6 +1190,9 @@ int of_overlay_remove(int *ovcs_id)
struct overlay_changeset *ovcs;
int ret, ret_apply, ret_tmp;
+ if (*ovcs_id == 0)
+ return 0;
+
if (devicetree_corrupt()) {
pr_err("suspect devicetree state, refuse to remove overlay\n");
ret = -EBUSY;
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] of: overlay: Avoid spurious error messages in of_overlay_remove()
2025-10-24 19:50 [PATCH] of: overlay: Avoid spurious error messages in of_overlay_remove() Christophe JAILLET
@ 2025-10-27 18:48 ` Rob Herring (Arm)
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring (Arm) @ 2025-10-27 18:48 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Saravana Kannan, devicetree, Dan Carpenter, linux-kernel,
kernel-janitors, andrea.porta
On Fri, 24 Oct 2025 21:50:58 +0200, Christophe JAILLET wrote:
> Make of_overlay_remove() tolerate ovcs_id being 0 without logging an error.
>
> Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This is needed for drivers/misc/rp1/rp1_pci.c where things are taken from
> DT or at runtime. In the former case, ovcs_id is unused and left to 0.
> Being able to tolerate such cases simplify error handling.
>
> This was suggested by Dan as a reply to patch [1].
>
> [1]: https://lore.kernel.org/lkml/4e92a271fdb98560c4e659556a1f3e99e7d0d38e.1760987458.git.christophe.jaillet@wanadoo.fr/
>
> ---
> drivers/of/overlay.c | 3 +++
> 1 file changed, 3 insertions(+)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-27 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24 19:50 [PATCH] of: overlay: Avoid spurious error messages in of_overlay_remove() Christophe JAILLET
2025-10-27 18:48 ` Rob Herring (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®