Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2555691ioo; Tue, 24 May 2022 00:00:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvvzGfRs5jRutcwzveaGlzBmGREYymxX3RAOnlc2BtF8JyNzqpAbLFBec3cOvBEKw+arNJ X-Received: by 2002:a17:906:9b92:b0:6fd:e4ce:e416 with SMTP id dd18-20020a1709069b9200b006fde4cee416mr23290854ejc.394.1653375648843; Tue, 24 May 2022 00:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653375648; cv=none; d=google.com; s=arc-20160816; b=0k9IiZdK5qI69IzxbJDljSoeM58RjATRiAAFvK03AQvmanJwSUSJm23Uhg7+J83oG/ SiQ9tvgKStT2gz0wrz2KZT9hy/j8H/OpKV2abFAFvu7yNEcmZ2R9IZwWcL613gRKJAgo d7GaCHmD7C0tucUvxYf833pQF6g/jrwVnx9SrWNy4UHHHM6LqQ0FrtVkOnnOICwO2JMG 576lNtwQYjUMcGOS1H1YTUSgmKjOzeqFCVW14k8gOUJkpoiQGTCuo3w8804oQ6ZZ11pj ujn9CPv4zea36lkJzyr6ycaDt4t2Rx9UkqZLlnRnVhSASU2dXduhPpi6oVRZvLpOZp56 uTCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=bwhcCZZqW73Gutc2t7bABaz1k0bJOliEFg85a44WEq8=; b=VNtbcNJMepZFKK9HcZe/NXSj/rJzfG7rsR48PEEBLG6Dp19sPGPAyu3ZuSPfyNUv+T ZQCl+hEj7ti84f6gXi3/xK+iwSsI6o+rbkWyGkfo2MK5nclyv+lerCpKVenJrv7Ndygz 8KSI0m+twLMbvwxxO4Tm2zRVu2V8L0FvEdKMbfdDczD/vyXutCV7oaunrkCboZN4BUeK scoi4zdEKpKtljC31Iue3TceAgOBzhzJAx11v/vSnCSgt2BLZ5O+1tINxMb9zro29yMq 6Zy7KgTkhFU49b0FAiJXQv9/QUCFbIv2XV83UXFUaQM4AjF9Y71Enr1gzwezt5Y8CJ6n eg6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb41-20020a1709077ea900b006fefa02d3c2si3286428ejc.457.2022.05.24.00.00.20; Tue, 24 May 2022 00:00:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232468AbiEXCxE (ORCPT + 99 others); Mon, 23 May 2022 22:53:04 -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 Content-Type: text/plain 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) X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; - 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