From: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
Subject: [PATCH 1/2] powerpc/powernv/opal-dump : Handles opal_dump_info properly
Date: Thu, 1 Dec 2016 14:38:08 +0530 [thread overview]
Message-ID: <1480583289-6380-1-git-send-email-mukesh02@linux.vnet.ibm.com> (raw)
Moves the return value check of 'opal_dump_info' to a proper place which
was previously unnecessarily filling all the dump info even on failure.
Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-dump.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 4c82782..ae32212 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -225,13 +225,16 @@ static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *
if (rc == OPAL_PARAMETER)
rc = opal_dump_info(&id, &size);
+ if (rc) {
+ pr_warn("%s: Failed to get dump info (%d)\n",
+ __func__, rc);
+ return rc;
+ }
+
*dump_id = be32_to_cpu(id);
*dump_size = be32_to_cpu(size);
*dump_type = be32_to_cpu(type);
- if (rc)
- pr_warn("%s: Failed to get dump info (%d)\n",
- __func__, rc);
return rc;
}
--
2.7.4
next reply other threads:[~2016-12-01 9:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 9:08 Mukesh Ojha [this message]
2016-12-01 9:08 ` [PATCH 2/2] powerpc/powernv/opal-dump : Use IRQ_HANDLED instead of numbers in interrupt handler Mukesh Ojha
2017-02-15 3:18 ` Jeremy Kerr
2017-02-15 10:27 ` Mukesh Ojha
2017-02-16 2:40 ` Jeremy Kerr
2017-02-20 13:19 ` Mukesh Ojha
2017-02-27 0:16 ` Jeremy Kerr
2017-02-15 5:08 ` Stewart Smith
2017-02-15 6:18 ` Mukesh Ojha
2016-12-06 6:37 ` [PATCH 1/2] powerpc/powernv/opal-dump : Handles opal_dump_info properly Mukesh Ojha
2017-02-13 6:32 ` Mukesh Ojha
2017-02-15 3:18 ` Jeremy Kerr
2017-02-15 5:04 ` Stewart Smith
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=1480583289-6380-1-git-send-email-mukesh02@linux.vnet.ibm.com \
--to=mukesh02@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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 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.