diff mbox series

LoongArch: Fix unsigned function returning negative constant

Message ID 1653360446-15598-1-git-send-email-baihaowen@meizu.com
State New
Headers show
Series LoongArch: Fix unsigned function returning negative constant | expand

Commit Message

baihaowen May 24, 2022, 2:47 a.m. UTC
The function set_virtual_map has an unsigned return type, but returns a
negative constant to indicate an error condition. So we change unsigned
to int.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 arch/loongarch/kernel/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c
index 69ebdd4220ec..f9fdeb1ae358 100644
--- a/arch/loongarch/kernel/efi.c
+++ b/arch/loongarch/kernel/efi.c
@@ -102,7 +102,7 @@  static void __init fix_efi_mapping(void)
  * in @memory_map whose EFI_MEMORY_RUNTIME attribute is set. Those descriptors
  * are also copied to @runtime_map, and their total count is returned in @count.
  */
-static unsigned int __init set_virtual_map(void)
+static int __init set_virtual_map(void)
 {
 	int count = 0;
 	unsigned int size;