[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1653360644-28872-1-git-send-email-baihaowen@meizu.com>
Date: Tue, 24 May 2022 10:50:44 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Ard Biesheuvel <ardb@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>
CC: Haowen Bai <baihaowen@...zu.com>, <linux-efi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] LoongArch: take size of pointed value, not pointer
Sizeof a pointer-typed expression returns the size of the pointer, not
that of the pointed data.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
arch/loongarch/kernel/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c
index f9fdeb1ae358..f0e5d0feffc2 100644
--- a/arch/loongarch/kernel/efi.c
+++ b/arch/loongarch/kernel/efi.c
@@ -180,7 +180,7 @@ void __init efi_init(void)
if (!efi_system_table)
return;
- efi_systab = (efi_system_table_t *)early_memremap_ro(efi_system_table, sizeof(efi_systab));
+ efi_systab = (efi_system_table_t *)early_memremap_ro(efi_system_table, sizeof(*efi_systab));
if (!efi_systab) {
pr_err("Can't find EFI system table.\n");
return;
--
2.7.4
Powered by blists - more mailing lists