From: jolly.shah@xilinx.com (Jolly Shah)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] firmware: xilinx: Move declaration of qdata to top of the function
Date: Mon, 10 Sep 2018 13:01:33 -0700 [thread overview]
Message-ID: <1536609694-7920-3-git-send-email-jollys@xilinx.com> (raw)
In-Reply-To: <1536609694-7920-1-git-send-email-jollys@xilinx.com>
From: Rajan Vaja <rajan.vaja@xilinx.com>
Move structure declaration from switch case to the top of function
and drop the braces.
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
---
drivers/firmware/xilinx/zynqmp-debug.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c
index 4532bd0..ecbd599 100644
--- a/drivers/firmware/xilinx/zynqmp-debug.c
+++ b/drivers/firmware/xilinx/zynqmp-debug.c
@@ -87,6 +87,7 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret)
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
u32 pm_api_version;
int ret;
+ struct zynqmp_pm_query_data qdata = {0};
if (!eemi_ops)
return -ENXIO;
@@ -107,9 +108,6 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret)
pm_api_ret[1]);
break;
case PM_QUERY_DATA:
- {
- struct zynqmp_pm_query_data qdata = {0};
-
qdata.qid = pm_api_arg[0];
qdata.arg1 = pm_api_arg[1];
qdata.arg2 = pm_api_arg[2];
@@ -131,7 +129,6 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret)
pm_api_ret[0], pm_api_ret[1],
pm_api_ret[2], pm_api_ret[3]);
break;
- }
default:
sprintf(debugfs_buf, "Unsupported PM-API request\n");
ret = -EINVAL;
--
2.7.4
next prev parent reply other threads:[~2018-09-10 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 20:01 [PATCH 0/3] drivers: firmware: xilinx: Minor fixes Jolly Shah
2018-09-10 20:01 ` [PATCH 1/3] firmware: xilinx: Replace init call with probe method Jolly Shah
2018-09-10 20:01 ` Jolly Shah [this message]
2018-09-10 20:01 ` [PATCH 3/3] firmware: xilinx: Replace if/else with switch case Jolly Shah
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=1536609694-7920-3-git-send-email-jollys@xilinx.com \
--to=jolly.shah@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).