* [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP}
@ 2022-04-20 13:02 Nuno Sá
2022-04-20 15:14 ` Rob Herring
2022-04-20 15:53 ` Frank Rowand
0 siblings, 2 replies; 3+ messages in thread
From: Nuno Sá @ 2022-04-20 13:02 UTC (permalink / raw)
To: devicetree; +Cc: Frank Rowand, Rob Herring, Pantelis Antoniou
We should not break overlay notifications on NOTIFY_{OK|STOP}
otherwise we might break on the first fragment. We should only stop
notifications if a *real* errno is returned by one of the listeners.
Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
v2:
* Only break fragment notification in case errno is returned from
notifier;
* Massaged commit message accordingly.
drivers/of/overlay.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index d80160cf34bb..d1187123c4fc 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -170,9 +170,7 @@ static int overlay_notify(struct overlay_changeset *ovcs,
ret = blocking_notifier_call_chain(&overlay_notify_chain,
action, &nd);
- if (ret == NOTIFY_OK || ret == NOTIFY_STOP)
- return 0;
- if (ret) {
+ if (notifier_to_errno(ret)) {
ret = notifier_to_errno(ret);
pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
of_overlay_action_name[action], ret, nd.target);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP}
2022-04-20 13:02 [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP} Nuno Sá
@ 2022-04-20 15:14 ` Rob Herring
2022-04-20 15:53 ` Frank Rowand
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-04-20 15:14 UTC (permalink / raw)
To: Nuno Sá; +Cc: Rob Herring, devicetree, Pantelis Antoniou, Frank Rowand
On Wed, 20 Apr 2022 15:02:05 +0200, Nuno Sá wrote:
> We should not break overlay notifications on NOTIFY_{OK|STOP}
> otherwise we might break on the first fragment. We should only stop
> notifications if a *real* errno is returned by one of the listeners.
>
> Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
> v2:
> * Only break fragment notification in case errno is returned from
> notifier;
> * Massaged commit message accordingly.
>
> drivers/of/overlay.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP}
2022-04-20 13:02 [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP} Nuno Sá
2022-04-20 15:14 ` Rob Herring
@ 2022-04-20 15:53 ` Frank Rowand
1 sibling, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2022-04-20 15:53 UTC (permalink / raw)
To: Nuno Sá, devicetree; +Cc: Rob Herring, Pantelis Antoniou
On 4/20/22 08:02, Nuno Sá wrote:
> We should not break overlay notifications on NOTIFY_{OK|STOP}
> otherwise we might break on the first fragment. We should only stop
> notifications if a *real* errno is returned by one of the listeners.
>
> Fixes: a1d19bd4cf1fe ("of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove")
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Thank you.
-Frank
> ---
> v2:
> * Only break fragment notification in case errno is returned from
> notifier;
> * Massaged commit message accordingly.
>
> drivers/of/overlay.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index d80160cf34bb..d1187123c4fc 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -170,9 +170,7 @@ static int overlay_notify(struct overlay_changeset *ovcs,
>
> ret = blocking_notifier_call_chain(&overlay_notify_chain,
> action, &nd);
> - if (ret == NOTIFY_OK || ret == NOTIFY_STOP)
> - return 0;
> - if (ret) {
> + if (notifier_to_errno(ret)) {
> ret = notifier_to_errno(ret);
> pr_err("overlay changeset %s notifier error %d, target: %pOF\n",
> of_overlay_action_name[action], ret, nd.target);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-20 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 13:02 [PATCH v2] of: overlay: do not break notify on NOTIFY_{OK|STOP} Nuno Sá
2022-04-20 15:14 ` Rob Herring
2022-04-20 15:53 ` Frank Rowand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.