mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Tull <atull@kernel.org>
To: Moritz Fischer <mdf@kernel.org>
Cc: Alan Tull <atull@kernel.org>,
	linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org
Subject: [PATCH v2 5/5] fpga: region: return NOTIFY_STOP if overlay shoud be accepted
Date: Wed, 15 Nov 2017 14:51:52 -0600	[thread overview]
Message-ID: <1510779112-5517-6-git-send-email-atull@kernel.org> (raw)
In-Reply-To: <1510779112-5517-1-git-send-email-atull@kernel.org>

Recent changes to the Device Tree overlay notifier code have changed
how notifier return codes are interpreted, requiring a NOTIFY_STOP to
signal that the overlay should be accepted.  This commit makes the
appropriate change to the FPGA region's Device Tree overlay notifier.

Fixes: 24789c5ce5a3 ("of: overlay: detect cases where device tree may become corrupt")
Signed-off-by: Alan Tull <atull@kernel.org>
---
v2: Added in v2 of this patchset.  Tested on linux-next/master.
---
 drivers/fpga/of-fpga-region.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c
index 276ffe2..a0c13cb 100644
--- a/drivers/fpga/of-fpga-region.c
+++ b/drivers/fpga/of-fpga-region.c
@@ -349,7 +349,8 @@ static void of_fpga_region_notify_post_remove(struct fpga_region *region,
  * This notifier handles programming a FPGA when a "firmware-name" property is
  * added to a fpga-region.
  *
- * Returns NOTIFY_OK or error if FPGA programming fails.
+ * Returns NOTIFY_OK if this notification isn't about this region or
+ * NOTIFY_STOP if the overaly is to be accepted or error if FPGA programming fails.
  */
 static int of_fpga_region_notify(struct notifier_block *nb,
 				 unsigned long action, void *arg)
@@ -395,7 +396,7 @@ static int of_fpga_region_notify(struct notifier_block *nb,
 	if (ret)
 		return notifier_from_errno(ret);
 
-	return NOTIFY_OK;
+	return NOTIFY_STOP;
 }
 
 static struct notifier_block fpga_region_of_nb = {
-- 
2.7.4

  parent reply	other threads:[~2017-11-15 20:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 20:51 [PATCH v2 0/5] fpga: don't use drvdata in common fpga code Alan Tull
2017-11-15 20:51 ` [PATCH v2 1/5] fpga: region: " Alan Tull
2017-12-04 21:32   ` Moritz Fischer
2017-12-04 22:03     ` Alan Tull
2017-11-15 20:51 ` [PATCH v2 2/5] fpga: manager: " Alan Tull
2017-11-15 20:51 ` [PATCH v2 3/5] fpga: bridge: " Alan Tull
2017-11-15 20:51 ` [PATCH v2 4/5] fpga: region: change fpga_region_register to have one param Alan Tull
2017-11-15 20:51 ` Alan Tull [this message]
2017-12-07 23:27   ` [PATCH v2 5/5] fpga: region: return NOTIFY_STOP if overlay shoud be accepted Moritz Fischer
2017-12-08 17:30     ` Alan Tull
2017-12-04 19:28 ` [PATCH v2 0/5] fpga: don't use drvdata in common fpga code Alan Tull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1510779112-5517-6-git-send-email-atull@kernel.org \
    --to=atull@kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome