linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxl: Don't ignore add_process_element result when attaching context
@ 2015-07-29  4:07 Daniel Axtens
  2015-07-29  4:25 ` Michael Ellerman
  2015-08-10  9:27 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Axtens @ 2015-07-29  4:07 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: mpe, benh, mikey, imunsie, Daniel Axtens

Previously, when attaching a context in dedicated mode, we ignored
the result of add_process_element, which could potentially fail.

If add_process_element returns and error, pass it back to the caller.

Signed-off-by: Daniel Axtens <dja@axtens.net>

---

I'm not sure if this is worth sending to stable: it doesn't fix
any actual bug, it just lets us know earlier if we've failed.

However, if mpe, Mikey or Ian feel like it should go to stable I
have no objection to that either.
---
 drivers/misc/cxl/native.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index debd97147b58..22c06d91faa8 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -551,9 +551,7 @@ static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
 	if ((result = cxl_afu_check_and_enable(ctx->afu)))
 		return result;
 
-	add_process_element(ctx);
-
-	return 0;
+	return add_process_element(ctx);
 }
 
 static int deactivate_afu_directed(struct cxl_afu *afu)
-- 
2.1.4

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

end of thread, other threads:[~2015-08-10  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29  4:07 [PATCH] cxl: Don't ignore add_process_element result when attaching context Daniel Axtens
2015-07-29  4:25 ` Michael Ellerman
2015-07-29  4:40   ` Daniel Axtens
2015-08-05  7:59     ` Michael Neuling
2015-08-10  9:27 ` Michael Ellerman

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