From nobody Mon Apr 29 18:08:04 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 324CDC433F5 for ; Tue, 24 May 2022 02:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233682AbiEXCxG (ORCPT ); Mon, 23 May 2022 22:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233626AbiEXCux (ORCPT ); Mon, 23 May 2022 22:50:53 -0400 Received: from mail.meizu.com (edge01.meizu.com [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98A3E6EB11; Mon, 23 May 2022 19:50:48 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 24 May 2022 10:50:46 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Tue, 24 May 2022 10:50:45 +0800 From: Haowen Bai To: Ard Biesheuvel , Huacai Chen CC: Haowen Bai , , Subject: [PATCH] LoongArch: take size of pointed value, not pointer Date: Tue, 24 May 2022 10:50:44 +0800 Message-ID: <1653360644-28872-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Sizeof a pointer-typed expression returns the size of the pointer, not that of the pointed data. Signed-off-by: Haowen Bai --- 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; =20 - efi_systab =3D (efi_system_table_t *)early_memremap_ro(efi_system_table, = sizeof(efi_systab)); + efi_systab =3D (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; --=20 2.7.4