From: Jie Gan <jie.gan@oss.qualcomm.com>
To: Nava kishore Manne <nava.kishore.manne@amd.com>,
michal.simek@amd.com, ronak.jain@amd.com,
gregkh@linuxfoundation.org, jay.buddhabhatti@amd.com,
praveen.teja.kundanala@amd.com,
siva.durga.prasad.paladugu@amd.com, u.kleine-koenig@baylibre.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] firmware: xilinx: Update the zynqmp_pm_load_pdi() API
Date: Fri, 24 Jan 2025 14:00:15 +0800 [thread overview]
Message-ID: <2fd825ac-ea58-4acd-a27b-b104868bcc20@oss.qualcomm.com> (raw)
In-Reply-To: <20250123103522.1258499-2-nava.kishore.manne@amd.com>
On 1/23/2025 6:35 PM, Nava kishore Manne wrote:
> Update the zynqmp_pm_load_pdi() API to handle the firmware
> error’s properly.
>
> Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com>
> ---
> drivers/firmware/xilinx/zynqmp.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 720fa8b5d8e9..ea04a6ac402d 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1483,8 +1483,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_set_requirement);
> */
> int zynqmp_pm_load_pdi(const u32 src, const u64 address)
> {
> - return zynqmp_pm_invoke_fn(PM_LOAD_PDI, NULL, 3, src, lower_32_bits(address),
> - upper_32_bits(address));
> + u32 ret_payload[PAYLOAD_ARG_CNT];
> + int ret;
> +
> + ret = zynqmp_pm_invoke_fn(PM_LOAD_PDI, ret_payload, 3, src,
> + lower_32_bits(address),
> + upper_32_bits(address));
> + if (ret_payload[0])
> + return ret_payload[0];
Looks a little bit hacking. As the ret_payload is u32, return as int, it
has possibility to overflow?
> +
> + return ret;
> }
> EXPORT_SYMBOL_GPL(zynqmp_pm_load_pdi);
>
Thanks,
Jie
next prev parent reply other threads:[~2025-01-24 6:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 10:35 [PATCH 0/2]firmware: xilinx: Updates to FPGA configuration APIs Nava kishore Manne
2025-01-23 10:35 ` [PATCH 1/2] firmware: xilinx: Update the zynqmp_pm_load_pdi() API Nava kishore Manne
2025-01-24 6:00 ` Jie Gan [this message]
2025-02-05 11:32 ` Manne, Nava kishore
2025-01-23 10:35 ` [PATCH 2/2] firmware: xilinx: Dont send linux address to get fpga config get status Nava kishore Manne
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=2fd825ac-ea58-4acd-a27b-b104868bcc20@oss.qualcomm.com \
--to=jie.gan@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jay.buddhabhatti@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=nava.kishore.manne@amd.com \
--cc=praveen.teja.kundanala@amd.com \
--cc=ronak.jain@amd.com \
--cc=siva.durga.prasad.paladugu@amd.com \
--cc=u.kleine-koenig@baylibre.com \
/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
all inboxes | Powered by JetHome®