summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_hart.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-10 09:06:14 +0300
committerAnup Patel <anup@brainfault.org>2020-05-19 06:49:34 +0300
commit49841832b85bbcc8ae99dc2b808175a1a8650ff3 (patch)
tree8f3460e224933741c99f6a84ca94baf039a165f0 /include/sbi/sbi_hart.h
parent28b40528499755ec19a6f8a06dc47e65619fb96c (diff)
downloadopensbi-49841832b85bbcc8ae99dc2b808175a1a8650ff3.tar.xz
lib: sbi: Improve get_feature_str() implementation and usage
We do following improvements for get_feature_str(): 1. We should return "none" from get_feature_str() no features available instead of sbi_boot_prints() explicitly handling failure. 2. We don't need to return failure (just like misa_xlen()) because we are returning "none" for no features and we are truncating output when space is not available. 3. Based on 1 and 2, the sbi_boot_prints() can be further simplified. 4. No need for two char[] in sbi_boot_prints() Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include/sbi/sbi_hart.h')
-rw-r--r--include/sbi/sbi_hart.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index cdcd865..a624dfd 100644
--- a/include/sbi/sbi_hart.h
+++ b/include/sbi/sbi_hart.h
@@ -43,7 +43,7 @@ int sbi_hart_pmp_check_addr(struct sbi_scratch *scratch, unsigned long daddr,
unsigned long attr);
bool sbi_hart_has_feature(u32 hartid, unsigned long feature);
unsigned long sbi_hart_get_features(u32 hartid);
-int sbi_hart_get_features_str(u32 hartid, char *features_str, int nfstr);
+void sbi_hart_get_features_str(u32 hartid, char *features_str, int nfstr);
void __attribute__((noreturn)) sbi_hart_hang(void);