From: Michal Simek <michal.simek@amd.com>
To: Stefan Herbrechtsmeier
<stefan.herbrechtsmeier-oss@weidmueller.com>,
u-boot@lists.denx.de
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
Ashok Reddy Soma <ashok.reddy.soma@amd.com>,
Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Subject: Re: [PATCH v3 2/2] firmware: zynqmp: Move config object permission check
Date: Tue, 16 May 2023 10:26:02 +0200 [thread overview]
Message-ID: <8bdcb8b1-64e6-5b72-26f5-b7c35dced700@amd.com> (raw)
In-Reply-To: <20230427103125.26719-2-stefan.herbrechtsmeier-oss@weidmueller.com>
Hi,
first of all sorry for delay.
On 4/27/23 12:31, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> Move the check of the permission to change a config object from
> zynqmp_pmufw_node function to zynqmp_pmufw_load_config_object function
> to simplify the code and check the permission only if required.
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> ---
>
> Changes in v3:
> - Added
>
> drivers/firmware/firmware-zynqmp.c | 32 +++++++++++++++---------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
> index 2b1ad5d2c3..d12159fa78 100644
> --- a/drivers/firmware/firmware-zynqmp.c
> +++ b/drivers/firmware/firmware-zynqmp.c
> @@ -70,20 +70,11 @@ int zynqmp_pmufw_config_close(void)
>
> int zynqmp_pmufw_node(u32 id)
> {
> - static bool skip_config;
> - int ret;
> -
> - if (skip_config)
> - return 0;
> -
> /* Record power domain id */
> xpm_configobject[NODE_ID_LOCATION] = id;
>
> - ret = zynqmp_pmufw_load_config_object(xpm_configobject,
> - sizeof(xpm_configobject));
> -
> - if (ret == -EACCES && id == NODE_OCM_BANK_0)
> - skip_config = true;
> + zynqmp_pmufw_load_config_object(xpm_configobject,
> + sizeof(xpm_configobject));
This is not right.
It should be
return zynqmp_pmufw_load... for error propagation.
And tbh zynqmp_pmufw_config_close should also do the same thing.
The rest looks good to me.
Thanks,
Michal
next prev parent reply other threads:[~2023-05-16 8:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 10:31 [PATCH v3 1/2] firmware: zynqmp: Remove extraordinary return value Stefan Herbrechtsmeier
2023-04-27 10:31 ` [PATCH v3 2/2] firmware: zynqmp: Move config object permission check Stefan Herbrechtsmeier
2023-05-16 8:26 ` Michal Simek [this message]
2023-05-16 11:23 ` Stefan Herbrechtsmeier
2023-05-16 11:43 ` Michal Simek
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=8bdcb8b1-64e6-5b72-26f5-b7c35dced700@amd.com \
--to=michal.simek@amd.com \
--cc=ashok.reddy.soma@amd.com \
--cc=jay.buddhabhatti@amd.com \
--cc=stefan.herbrechtsmeier-oss@weidmueller.com \
--cc=stefan.herbrechtsmeier@weidmueller.com \
--cc=u-boot@lists.denx.de \
/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