public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
@ 2021-05-19 14:58 Daniel Schaefer
  2021-05-19 15:30 ` Abner Chang
       [not found] ` <1680817ADB2092C8.5504@groups.io>
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Schaefer @ 2021-05-19 14:58 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Leif Lindholm, Ard Biesheuvel, Anup Patel

OpenSBI has started using those in v0.9. See:
https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/EmbeddedPkg/Include/libfdt_env.h b/EmbeddedPkg/Include/libfdt_env.h
index 7feff52bc0fb..c35ac739703c 100644
--- a/EmbeddedPkg/Include/libfdt_env.h
+++ b/EmbeddedPkg/Include/libfdt_env.h
@@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t strsz ) {
   return AsciiStrnLenS (str, strsz);
 }
 
+static inline size_t strcmp (const char* str1, const char* str2) {
+  return AsciiStrCmp (str1, str2);
+}
+
 static inline size_t strncmp (const char* str1, const char* str2, size_t strsz ) {
   return AsciiStrnCmp (str1, str2, strsz);
 }
 
+static inline size_t strncpy (char* dest, const char* source, size_t dest_max) {
+  return AsciiStrCpyS (dest, dest_max, source);
+}
+
 #endif /* _LIBFDT_ENV_H */
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
  2021-05-19 14:58 [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h Daniel Schaefer
@ 2021-05-19 15:30 ` Abner Chang
       [not found] ` <1680817ADB2092C8.5504@groups.io>
  1 sibling, 0 replies; 5+ messages in thread
From: Abner Chang @ 2021-05-19 15:30 UTC (permalink / raw)
  To: Schaefer, Daniel, devel@edk2.groups.io
  Cc: Leif Lindholm, Ard Biesheuvel, Anup Patel

Reviewed-by: Abner Chang <abner.chang@hpe.com>

> -----Original Message-----
> From: Schaefer, Daniel
> Sent: Wednesday, May 19, 2021 10:58 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Leif
> Lindholm <leif@nuviainc.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>;
> Anup Patel <anup.patel@wdc.com>
> Subject: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to
> libfdt_env.h
> 
> OpenSBI has started using those in v0.9. See:
> https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Anup Patel <anup.patel@wdc.com>
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> ---
>  EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/EmbeddedPkg/Include/libfdt_env.h
> b/EmbeddedPkg/Include/libfdt_env.h
> index 7feff52bc0fb..c35ac739703c 100644
> --- a/EmbeddedPkg/Include/libfdt_env.h
> +++ b/EmbeddedPkg/Include/libfdt_env.h
> @@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t strsz ) {
>    return AsciiStrnLenS (str, strsz);
> 
>  }
> 
> 
> 
> +static inline size_t strcmp (const char* str1, const char* str2) {
> 
> +  return AsciiStrCmp (str1, str2);
> 
> +}
> 
> +
> 
>  static inline size_t strncmp (const char* str1, const char* str2, size_t strsz ) {
> 
>    return AsciiStrnCmp (str1, str2, strsz);
> 
>  }
> 
> 
> 
> +static inline size_t strncpy (char* dest, const char* source, size_t dest_max) {
> 
> +  return AsciiStrCpyS (dest, dest_max, source);
> 
> +}
> 
> +
> 
>  #endif /* _LIBFDT_ENV_H */
> 
> --
> 2.30.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
       [not found] ` <1680817ADB2092C8.5504@groups.io>
@ 2021-07-14 14:05   ` Abner Chang
  2021-08-04 12:33     ` Leif Lindholm
  0 siblings, 1 reply; 5+ messages in thread
From: Abner Chang @ 2021-07-14 14:05 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner (HPS SW/FW Technologist),
	Schaefer, Daniel
  Cc: Leif Lindholm, Ard Biesheuvel, Anup Patel

Hi Leif and Ard,
Please help to review this and merge it if you have no comments on this patch.

Thanks
Abner

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Wednesday, May 19, 2021 11:30 PM
> To: Schaefer, Daniel <daniel.schaefer@hpe.com>; devel@edk2.groups.io
> Cc: Leif Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>; Anup Patel <anup.patel@wdc.com>
> Subject: Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp
> and strncpy to libfdt_env.h
> 
> Reviewed-by: Abner Chang <abner.chang@hpe.com>
> 
> > -----Original Message-----
> > From: Schaefer, Daniel
> > Sent: Wednesday, May 19, 2021 10:58 PM
> > To: devel@edk2.groups.io
> > Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> Leif
> > Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>;
> > Anup Patel <anup.patel@wdc.com>
> > Subject: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to
> > libfdt_env.h
> >
> > OpenSBI has started using those in v0.9. See:
> > https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c
> >
> > Cc: Abner Chang <abner.chang@hpe.com>
> > Cc: Leif Lindholm <leif@nuviainc.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > Cc: Anup Patel <anup.patel@wdc.com>
> > Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> > ---
> >  EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/EmbeddedPkg/Include/libfdt_env.h
> > b/EmbeddedPkg/Include/libfdt_env.h
> > index 7feff52bc0fb..c35ac739703c 100644
> > --- a/EmbeddedPkg/Include/libfdt_env.h
> > +++ b/EmbeddedPkg/Include/libfdt_env.h
> > @@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t
> strsz ) {
> >    return AsciiStrnLenS (str, strsz);
> >
> >  }
> >
> >
> >
> > +static inline size_t strcmp (const char* str1, const char* str2) {
> >
> > +  return AsciiStrCmp (str1, str2);
> >
> > +}
> >
> > +
> >
> >  static inline size_t strncmp (const char* str1, const char* str2, size_t strsz )
> {
> >
> >    return AsciiStrnCmp (str1, str2, strsz);
> >
> >  }
> >
> >
> >
> > +static inline size_t strncpy (char* dest, const char* source, size_t
> dest_max) {
> >
> > +  return AsciiStrCpyS (dest, dest_max, source);
> >
> > +}
> >
> > +
> >
> >  #endif /* _LIBFDT_ENV_H */
> >
> > --
> > 2.30.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
  2021-07-14 14:05   ` [edk2-devel] " Abner Chang
@ 2021-08-04 12:33     ` Leif Lindholm
  2021-08-04 12:47       ` Abner Chang
  0 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2021-08-04 12:33 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist)
  Cc: devel@edk2.groups.io, Schaefer, Daniel, Ard Biesheuvel,
	Anup Patel

Gah, sorry.

The original patch landed while I was distracted, and this reminder
while I was on holiday.

Apart from the typo in the subject line, I guess I'm OK with this.
Acked-by: Leif Lindholm <leif@nuviainc.com>

However, I have a feeling RISC-V will be updating EmbeddedPkg as
frequently as ARM in the near future.
Could we add one or both of you as maintainers?

/
    Leif

On Wed, Jul 14, 2021 at 14:05:53 +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
> Hi Leif and Ard,
> Please help to review this and merge it if you have no comments on this patch.
> 
> Thanks
> Abner
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Abner Chang
> > Sent: Wednesday, May 19, 2021 11:30 PM
> > To: Schaefer, Daniel <daniel.schaefer@hpe.com>; devel@edk2.groups.io
> > Cc: Leif Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>; Anup Patel <anup.patel@wdc.com>
> > Subject: Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp
> > and strncpy to libfdt_env.h
> > 
> > Reviewed-by: Abner Chang <abner.chang@hpe.com>
> > 
> > > -----Original Message-----
> > > From: Schaefer, Daniel
> > > Sent: Wednesday, May 19, 2021 10:58 PM
> > > To: devel@edk2.groups.io
> > > Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> > Leif
> > > Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> > <ard.biesheuvel@arm.com>;
> > > Anup Patel <anup.patel@wdc.com>
> > > Subject: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to
> > > libfdt_env.h
> > >
> > > OpenSBI has started using those in v0.9. See:
> > > https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c
> > >
> > > Cc: Abner Chang <abner.chang@hpe.com>
> > > Cc: Leif Lindholm <leif@nuviainc.com>
> > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > Cc: Anup Patel <anup.patel@wdc.com>
> > > Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > ---
> > >  EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > diff --git a/EmbeddedPkg/Include/libfdt_env.h
> > > b/EmbeddedPkg/Include/libfdt_env.h
> > > index 7feff52bc0fb..c35ac739703c 100644
> > > --- a/EmbeddedPkg/Include/libfdt_env.h
> > > +++ b/EmbeddedPkg/Include/libfdt_env.h
> > > @@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t
> > strsz ) {
> > >    return AsciiStrnLenS (str, strsz);
> > >
> > >  }
> > >
> > >
> > >
> > > +static inline size_t strcmp (const char* str1, const char* str2) {
> > >
> > > +  return AsciiStrCmp (str1, str2);
> > >
> > > +}
> > >
> > > +
> > >
> > >  static inline size_t strncmp (const char* str1, const char* str2, size_t strsz )
> > {
> > >
> > >    return AsciiStrnCmp (str1, str2, strsz);
> > >
> > >  }
> > >
> > >
> > >
> > > +static inline size_t strncpy (char* dest, const char* source, size_t
> > dest_max) {
> > >
> > > +  return AsciiStrCpyS (dest, dest_max, source);
> > >
> > > +}
> > >
> > > +
> > >
> > >  #endif /* _LIBFDT_ENV_H */
> > >
> > > --
> > > 2.30.1
> > 
> > 
> > 
> > 
> > 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h
  2021-08-04 12:33     ` Leif Lindholm
@ 2021-08-04 12:47       ` Abner Chang
  0 siblings, 0 replies; 5+ messages in thread
From: Abner Chang @ 2021-08-04 12:47 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: devel@edk2.groups.io, Schaefer, Daniel, Ard Biesheuvel,
	Anup Patel



> -----Original Message-----
> From: Leif Lindholm [mailto:leif@nuviainc.com]
> Sent: Wednesday, August 4, 2021 8:34 PM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: devel@edk2.groups.io; Schaefer, Daniel <daniel.schaefer@hpe.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>; Anup Patel
> <anup.patel@wdc.com>
> Subject: Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp
> and strncpy to libfdt_env.h
> 
> Gah, sorry.
> 
> The original patch landed while I was distracted, and this reminder
> while I was on holiday.
Thanks, will correct the subject before merging it.

> 
> Apart from the typo in the subject line, I guess I'm OK with this.
> Acked-by: Leif Lindholm <leif@nuviainc.com>
> 
> However, I have a feeling RISC-V will be updating EmbeddedPkg as
> frequently as ARM in the near future.
> Could we add one or both of you as maintainers?
Sure, we can be the  maintainers of EmbeddedPkg.

I can send out the patch of maintainers.txt first and then merge this patch later.
Thanks
Abner


> 
> /
>     Leif
> 
> On Wed, Jul 14, 2021 at 14:05:53 +0000, Chang, Abner (HPS SW/FW
> Technologist) wrote:
> > Hi Leif and Ard,
> > Please help to review this and merge it if you have no comments on this
> patch.
> >
> > Thanks
> > Abner
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> Of
> > > Abner Chang
> > > Sent: Wednesday, May 19, 2021 11:30 PM
> > > To: Schaefer, Daniel <daniel.schaefer@hpe.com>; devel@edk2.groups.io
> > > Cc: Leif Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>; Anup Patel <anup.patel@wdc.com>
> > > Subject: Re: [edk2-devel] [PATCH v1 1/1] EmbeddedPkg/libfdt: Add
> strmp
> > > and strncpy to libfdt_env.h
> > >
> > > Reviewed-by: Abner Chang <abner.chang@hpe.com>
> > >
> > > > -----Original Message-----
> > > > From: Schaefer, Daniel
> > > > Sent: Wednesday, May 19, 2021 10:58 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> > > Leif
> > > > Lindholm <leif@nuviainc.com>; Ard Biesheuvel
> > > <ard.biesheuvel@arm.com>;
> > > > Anup Patel <anup.patel@wdc.com>
> > > > Subject: [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to
> > > > libfdt_env.h
> > > >
> > > > OpenSBI has started using those in v0.9. See:
> > > > https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c
> > > >
> > > > Cc: Abner Chang <abner.chang@hpe.com>
> > > > Cc: Leif Lindholm <leif@nuviainc.com>
> > > > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > > Cc: Anup Patel <anup.patel@wdc.com>
> > > > Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > > ---
> > > >  EmbeddedPkg/Include/libfdt_env.h | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >
> > > > diff --git a/EmbeddedPkg/Include/libfdt_env.h
> > > > b/EmbeddedPkg/Include/libfdt_env.h
> > > > index 7feff52bc0fb..c35ac739703c 100644
> > > > --- a/EmbeddedPkg/Include/libfdt_env.h
> > > > +++ b/EmbeddedPkg/Include/libfdt_env.h
> > > > @@ -76,8 +76,16 @@ static inline size_t strnlen (const char* str, size_t
> > > strsz ) {
> > > >    return AsciiStrnLenS (str, strsz);
> > > >
> > > >  }
> > > >
> > > >
> > > >
> > > > +static inline size_t strcmp (const char* str1, const char* str2) {
> > > >
> > > > +  return AsciiStrCmp (str1, str2);
> > > >
> > > > +}
> > > >
> > > > +
> > > >
> > > >  static inline size_t strncmp (const char* str1, const char* str2, size_t
> strsz )
> > > {
> > > >
> > > >    return AsciiStrnCmp (str1, str2, strsz);
> > > >
> > > >  }
> > > >
> > > >
> > > >
> > > > +static inline size_t strncpy (char* dest, const char* source, size_t
> > > dest_max) {
> > > >
> > > > +  return AsciiStrCpyS (dest, dest_max, source);
> > > >
> > > > +}
> > > >
> > > > +
> > > >
> > > >  #endif /* _LIBFDT_ENV_H */
> > > >
> > > > --
> > > > 2.30.1
> > >
> > >
> > >
> > > 
> > >
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-04 12:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-19 14:58 [PATCH v1 1/1] EmbeddedPkg/libfdt: Add strmp and strncpy to libfdt_env.h Daniel Schaefer
2021-05-19 15:30 ` Abner Chang
     [not found] ` <1680817ADB2092C8.5504@groups.io>
2021-07-14 14:05   ` [edk2-devel] " Abner Chang
2021-08-04 12:33     ` Leif Lindholm
2021-08-04 12:47       ` Abner Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox