U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Patrick DELAUNAY <patrick.delaunay@foss.st.com>, u-boot@lists.denx.de
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 1/2] env: mmc: Clean up macro usage
Date: Thu, 23 Feb 2023 14:22:51 +0100	[thread overview]
Message-ID: <2dd5b09a-515f-601d-e973-4404bfc42ea8@denx.de> (raw)
In-Reply-To: <1125e79c-222b-ba3a-e342-81f609dbb68a@foss.st.com>

On 2/23/23 11:41, Patrick DELAUNAY wrote:
> Hi Marek,

Hi,

> On 2/9/23 13:30, Marek Vasut wrote:
>> Consistently use 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
>> mix of ifdef.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
>> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> Cc: Tom Rini <trini@konsulko.com>
>> ---
>> V2: Replace CONFIG_IS_ENABLED(PARTITION_TYPE_GUID) with 
>> IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)
>> ---
>>   env/mmc.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/env/mmc.c b/env/mmc.c
>> index 5b01f657a7a..d51a5579128 100644
>> --- a/env/mmc.c
>> +++ b/env/mmc.c
>> @@ -73,8 +73,7 @@ static inline int mmc_offset_try_partition(const 
>> char *str, int copy, s64 *val)
>>           if (str && !strncmp((const char *)info.name, str, 
>> sizeof(info.name)))
>>               break;
>> -#ifdef CONFIG_PARTITION_TYPE_GUID
>> -        if (!str) {
>> +        if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID) && !str) {
>>               const efi_guid_t env_guid = PARTITION_U_BOOT_ENVIRONMENT;
>>               efi_guid_t type_guid;
>> @@ -82,7 +81,6 @@ static inline int mmc_offset_try_partition(const 
>> char *str, int copy, s64 *val)
>>               if (!memcmp(&env_guid, &type_guid, sizeof(efi_guid_t)))
>>                   break;
>>           }
>> -#endif
>>       }
>>       /* round up to info.blksz */
> 
> 
> If I remenber, I try this test with IS_ENABLED when I propose my patch
> 
> and I have compilation issue on next line
> 
> 
> +            uuid_str_to_bin(info.type_guid, type_guid.b, 
> UUID_STR_FORMAT_GUID);
> 
> 
> because "info.type_guid" don't exist in struct disk_partition
> 
> see ./include/part.h:59
> 
> 
> struct disk_partition {
>      lbaint_t    start;    /* # of first block in partition    */
> ...
> #ifdef CONFIG_PARTITION_TYPE_GUID
>      char    type_guid[UUID_STR_LEN + 1];    /* type GUID as string, if 
> exists    */
> #endif
> ...
> };

Uh, which defconfig triggers this ?

Also, is there a way to deal with this failure without reinstating the 
ifdef ? Tom ?

  reply	other threads:[~2023-02-23 13:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230209123058epcas1p22a2f76f8e2ba8c365886322e217cb453@epcas1p2.samsung.com>
2023-02-09 12:30 ` [PATCH v2 1/2] env: mmc: Clean up macro usage Marek Vasut
2023-02-09 12:30   ` [PATCH v2 2/2] env: mmc: Apply GPT only on eMMC user HW partition Marek Vasut
2023-02-09 15:27     ` Tom Rini
2023-02-09 16:33       ` Marek Vasut
2023-02-24 14:43     ` Tom Rini
2023-02-09 15:27   ` [PATCH v2 1/2] env: mmc: Clean up macro usage Tom Rini
2023-02-09 20:13     ` Simon Glass
2023-02-10  0:01   ` Jaehoon Chung
2023-02-23 10:41   ` Patrick DELAUNAY
2023-02-23 13:22     ` Marek Vasut [this message]
2023-02-23 16:32       ` Tom Rini
2023-02-23 18:24         ` Marek Vasut
2023-02-23 17:17       ` Simon Glass

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=2dd5b09a-515f-601d-e973-4404bfc42ea8@denx.de \
    --to=marex@denx.de \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=trini@konsulko.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