From: Manuel Reis <mluis.reis@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART\r
definition
Date: Wed, 25 Nov 2020 10:19:26 +0000 [thread overview]
Message-ID: <EOKCKQ.C1I8OHDQQD6Q1@gmail.com> (raw)
In-Reply-To: <169cce16a34e41db952152dc3b1c5311@SFHDAG2NODE3.st.com>
Hi,
thanks for the feedback.
Just sent a new corrected patch with fixed commit message title:
[PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART
definition.
regards,
Manuel
On qua, 25 nov, 2020 at 08:45, Patrick DELAUNAY
<patrick.delaunay@st.com> wrote:
> Hi,
>
>> From: Manuel Reis <mluis.reis@gmail.com>
>> Sent: dimanche 22 novembre 2020 16:20
>>
>> Check whether user has explicitly defined device and partition
>> where environment
>> file will be located. Voids the need to set such partition as
>> bootable to work with
>> the 'dev:auto'
>>
>> Signed-off-by: Manuel Reis <mluis.reis@gmail.com>
>> Cc: Patrick Delaunay <patrick.delaunay@st.com>
>> Cc: Patrice Chotard <patrice.chotard@st.com>
>> ---
>>
>> board/st/stm32mp1/stm32mp1.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/board/st/stm32mp1/stm32mp1.c
>> b/board/st/stm32mp1/stm32mp1.c
>> index 4553329b25..4dda70740d 100644
>> --- a/board/st/stm32mp1/stm32mp1.c
>> +++ b/board/st/stm32mp1/stm32mp1.c
>> @@ -868,6 +868,11 @@ const char *env_ext4_get_intf(void)
>>
>> const char *env_ext4_get_dev_part(void) {
>> + static char *const env_dev_part =
>> CONFIG_ENV_EXT4_DEVICE_AND_PART;
>> +
>> + if (strlen(env_dev_part) > 0)
>> + return env_dev_part;
>> +
>> static char *const dev_part[] = {"0:auto", "1:auto", "2:auto"};
>> u32 bootmode = get_bootmode();
>>
>> --
>> 2.27.0
>
> Behavior seems ok, but patch mixes code and variables.
> can you move the code part after the variables definitions ?
>
> const char *env_ext4_get_dev_part(void) {
> static char *const dev_part[] = {"0:auto", "1:auto", "2:auto"};
> u32 bootmode = get_bootmode();
> + static char *const env_dev_part =
> CONFIG_ENV_EXT4_DEVICE_AND_PART;
> +
> + if (strlen(env_dev_part) > 0)
> + return env_dev_part;
> +
>
> Regards
>
> PAtrick
prev parent reply other threads:[~2020-11-25 10:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 15:19 [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition Manuel Reis
2020-11-24 15:24 ` Michael Opdenacker
2020-11-25 8:45 ` Patrick DELAUNAY
2020-11-25 10:19 ` Manuel Reis [this message]
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=EOKCKQ.C1I8OHDQQD6Q1@gmail.com \
--to=mluis.reis@gmail.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