lib: utils: Include sbi_strings.h directly
PATCH 1/1 lib: utils: Include sbi_strings.h directly
From: Daniel Schaefer <[email protected]>
This file uses sbi_strncpy, sbi_strncmp and sbi_memset, which are defined in sbi_strings.h.
It should already be transitively included via #include <sbi/sbi_scratch.h> but my toolchain doesn't do that for some reason. Perhaps because the functions that refer to them are static?
Anyways, it would be good to directly reference the header here.
--- lib/utils/fdt/fdt_domain.c | 1 + 1 file changed, 1 insertion(+)
lib/utils/fdt/fdt_domain.c +1 -0
@@ -13,6 +13,7 @@#include <sbi/sbi_error.h> #include <sbi/sbi_hartmask.h> #include <sbi/sbi_scratch.h> +#include <sbi/sbi_string.h> #include <sbi_utils/fdt/fdt_domain.h> #include <sbi_utils/fdt/fdt_helper.h>
Signature · 1 line
2.30.1
PATCH 1/1 lib: utils: Include sbi_strings.h directly
Quoted 11 lines
-----Original Message-----
From: opensbi <[email protected]> On Behalf Of Daniel Schaefer
Sent: 12 May 2021 16:43
To: opensbi at lists.infradead.org
Cc: Abner Chang <[email protected]>; Anup Patel <[email protected]>
Subject: [PATCH v1 1/1] lib: utils: Includesbi_strings.hdirectly
Quoted 8 lines
From: Daniel Schaefer <[email protected]>
This file uses
sbi_strncpy,sbi_strncmpandsbi_memset, which are defined insbi_strings.h.It should already be transitively included via
#include <sbi/sbi_scratch.h>but my toolchain doesn't do that for some reason.
Perhaps because the functions that refer to them arestatic?
Can you try renaming __STRING_H__ to __SBI_STRING_H__ in sbi_string.h ?
Regards,
Anup
Quoted 30 lines
Anyways, it would be good to directly reference the header here.
Cc Abner Chang <[email protected]>Cc Anup Patel <[email protected]>Signed-off-by Daniel Schaefer <[email protected]>--- lib/utils/fdt/fdt_domain.c | 1 + 1 file changed, 1 insertion(+)lib/utils/fdt/fdt_domain.c index renamed from lib/utils/fdt/fdt_domain.c +0
-0
95c195d65238..b2b5f6196a1a100644lib/utils/fdt/fdt_domain.c +1
-1@@ -13,6 +13,7 @@#include <sbi/sbi_error.h> #include <sbi/sbi_hartmask.h> #include <sbi/sbi_scratch.h> +#include <sbi/sbi_string.h> #include <sbi_utils/fdt/fdt_domain.h> #include <sbi_utils/fdt/fdt_helper.h> --2.30.1
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
PATCH 1/1 lib: utils: Include sbi_strings.h directly
Quoted 13 lines · Anup Patel
Quoted 13 lines
-----Original Message-----
From: opensbi <[email protected]> On Behalf Of Daniel Schaefer
Sent: 12 May 2021 16:43
To: opensbi at lists.infradead.org
Cc: Abner Chang <[email protected]>; Anup Patel <[email protected]>
Subject: [PATCH v1 1/1] lib: utils: Includesbi_strings.hdirectlyFrom: Daniel Schaefer <[email protected]>
Quoted 8 lines
Quoted 6 lines
This file uses
sbi_strncpy,sbi_strncmpandsbi_memset, which are defined insbi_strings.h.It should already be transitively included via
#include <sbi/sbi_scratch.h>but my toolchain doesn't do that for some reason.
Perhaps because the functions that refer to them arestatic?Can you try renaming
__STRING_H__to__SBI_STRING_H__insbi_string.h?
That doesn't help, unfortunately.
Quoted 34 lines
Regards,
AnupQuoted 30 lines
Anyways, it would be good to directly reference the header here.
Cc Abner Chang <[email protected]>Cc Anup Patel <[email protected]>Signed-off-by Daniel Schaefer <[email protected]>--- lib/utils/fdt/fdt_domain.c | 1 + 1 file changed, 1 insertion(+)lib/utils/fdt/fdt_domain.c index renamed from lib/utils/fdt/fdt_domain.c +0
-0
95c195d65238..b2b5f6196a1a100644lib/utils/fdt/fdt_domain.c +1
-1@@ -13,6 +13,7 @@#include <sbi/sbi_error.h> #include <sbi/sbi_hartmask.h> #include <sbi/sbi_scratch.h> +#include <sbi/sbi_string.h> #include <sbi_utils/fdt/fdt_domain.h> #include <sbi_utils/fdt/fdt_helper.h> --2.30.1
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi