diff mbox series

[v2,1/3] lib: utils: Add strncpy macro to libfdt_env.h

Message ID 20210519075410.8520-2-daniel.schaefer@hpe.com
State Accepted
Headers show
Series Don't use SBI functions in fdt code | expand

Commit Message

Daniel Schaefer May 19, 2021, 7:54 a.m. UTC
Just like 2845d2d2cf4fb74a89452ba223995aa4a118c07e
we want to use sbi_strncpy as strncpy in the OpenSBI implementation for
libfdt.

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Anup Patel <Anup.Patel@wdc.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Reviewed-by: Abner Chang <abner.chang@hpe.com>
---
 lib/utils/libfdt/libfdt_env.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Xiang W May 19, 2021, 8:37 a.m. UTC | #1
在 2021-05-19三的 15:54 +0800,Daniel Schaefer写道:
> Just like 2845d2d2cf4fb74a89452ba223995aa4a118c07e
> we want to use sbi_strncpy as strncpy in the OpenSBI implementation
> for
> libfdt.
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Anup Patel <Anup.Patel@wdc.com>
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> Reviewed-by: Abner Chang <abner.chang@hpe.com>

Reviewed-by: Xiang W <wxjstz@126.com>

> ---
>  lib/utils/libfdt/libfdt_env.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/utils/libfdt/libfdt_env.h
> b/lib/utils/libfdt/libfdt_env.h
> index bc3e7588660a..f9d9c6783c52 100644
> --- a/lib/utils/libfdt/libfdt_env.h
> +++ b/lib/utils/libfdt/libfdt_env.h
> @@ -31,6 +31,7 @@
>  #define strchr		sbi_strchr
>  #define strrchr		sbi_strrchr
>  #define strcpy		sbi_strcpy
> +#define strncpy		sbi_strncpy
>  #define strcmp		sbi_strcmp
>  #define strncmp		sbi_strncmp
>  #define strlen		sbi_strlen
> -- 
> 2.30.1
> 
>
Anup Patel May 19, 2021, 12:51 p.m. UTC | #2
> -----Original Message-----
> From: Xiang W <wxjstz@126.com>
> Sent: 19 May 2021 14:08
> To: Daniel Schaefer <daniel.schaefer@hpe.com>;
> opensbi@lists.infradead.org
> Cc: Abner Chang <abner.chang@hpe.com>; Anup Patel
> <Anup.Patel@wdc.com>
> Subject: Re: [PATCH v2 1/3] lib: utils: Add strncpy macro to libfdt_env.h
> 
> 在 2021-05-19三的 15:54 +0800,Daniel Schaefer写道:
> > Just like 2845d2d2cf4fb74a89452ba223995aa4a118c07e
> > we want to use sbi_strncpy as strncpy in the OpenSBI implementation
> > for libfdt.
> >
> > Cc: Abner Chang <abner.chang@hpe.com>
> > Cc: Anup Patel <Anup.Patel@wdc.com>
> > Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> > Reviewed-by: Abner Chang <abner.chang@hpe.com>
> 
> Reviewed-by: Xiang W <wxjstz@126.com>

Looks good to me.

Reviewed-by: Anup Patel <anup.patel@wdc.com>

Regards,
Anup

> 
> > ---
> >  lib/utils/libfdt/libfdt_env.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/utils/libfdt/libfdt_env.h
> > b/lib/utils/libfdt/libfdt_env.h index bc3e7588660a..f9d9c6783c52
> > 100644
> > --- a/lib/utils/libfdt/libfdt_env.h
> > +++ b/lib/utils/libfdt/libfdt_env.h
> > @@ -31,6 +31,7 @@
> >  #define strchr		sbi_strchr
> >  #define strrchr		sbi_strrchr
> >  #define strcpy		sbi_strcpy
> > +#define strncpy		sbi_strncpy
> >  #define strcmp		sbi_strcmp
> >  #define strncmp		sbi_strncmp
> >  #define strlen		sbi_strlen
> > --
> > 2.30.1
> >
> >
Anup Patel May 19, 2021, 12:54 p.m. UTC | #3
> -----Original Message-----
> From: Anup Patel
> Sent: 19 May 2021 18:22
> To: Xiang W <wxjstz@126.com>; Daniel Schaefer
> <daniel.schaefer@hpe.com>; opensbi@lists.infradead.org
> Cc: Abner Chang <abner.chang@hpe.com>
> Subject: RE: [PATCH v2 1/3] lib: utils: Add strncpy macro to libfdt_env.h
> 
> 
> 
> > -----Original Message-----
> > From: Xiang W <wxjstz@126.com>
> > Sent: 19 May 2021 14:08
> > To: Daniel Schaefer <daniel.schaefer@hpe.com>;
> > opensbi@lists.infradead.org
> > Cc: Abner Chang <abner.chang@hpe.com>; Anup Patel
> <Anup.Patel@wdc.com>
> > Subject: Re: [PATCH v2 1/3] lib: utils: Add strncpy macro to
> > libfdt_env.h
> >
> > 在 2021-05-19三的 15:54 +0800,Daniel Schaefer写道:
> > > Just like 2845d2d2cf4fb74a89452ba223995aa4a118c07e
> > > we want to use sbi_strncpy as strncpy in the OpenSBI implementation
> > > for libfdt.
> > >
> > > Cc: Abner Chang <abner.chang@hpe.com>
> > > Cc: Anup Patel <Anup.Patel@wdc.com>
> > > Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > Reviewed-by: Abner Chang <abner.chang@hpe.com>
> >
> > Reviewed-by: Xiang W <wxjstz@126.com>
> 
> Looks good to me.
> 
> Reviewed-by: Anup Patel <anup.patel@wdc.com>

Forgot to mention that I have applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> 
> Regards,
> Anup
> 
> >
> > > ---
> > >  lib/utils/libfdt/libfdt_env.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/utils/libfdt/libfdt_env.h
> > > b/lib/utils/libfdt/libfdt_env.h index bc3e7588660a..f9d9c6783c52
> > > 100644
> > > --- a/lib/utils/libfdt/libfdt_env.h
> > > +++ b/lib/utils/libfdt/libfdt_env.h
> > > @@ -31,6 +31,7 @@
> > >  #define strchr		sbi_strchr
> > >  #define strrchr		sbi_strrchr
> > >  #define strcpy		sbi_strcpy
> > > +#define strncpy		sbi_strncpy
> > >  #define strcmp		sbi_strcmp
> > >  #define strncmp		sbi_strncmp
> > >  #define strlen		sbi_strlen
> > > --
> > > 2.30.1
> > >
> > >
diff mbox series

Patch

diff --git a/lib/utils/libfdt/libfdt_env.h b/lib/utils/libfdt/libfdt_env.h
index bc3e7588660a..f9d9c6783c52 100644
--- a/lib/utils/libfdt/libfdt_env.h
+++ b/lib/utils/libfdt/libfdt_env.h
@@ -31,6 +31,7 @@ 
 #define strchr		sbi_strchr
 #define strrchr		sbi_strrchr
 #define strcpy		sbi_strcpy
+#define strncpy		sbi_strncpy
 #define strcmp		sbi_strcmp
 #define strncmp		sbi_strncmp
 #define strlen		sbi_strlen