Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2567249ioo; Tue, 24 May 2022 00:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymGl+yrYxVExYrecqSv4p2Tg+ZAQcniurI9E46p0Akx/0NQ9+Y0cjWhpt8jljKh4t3RLku X-Received: by 2002:a17:906:c109:b0:6f4:d700:2e66 with SMTP id do9-20020a170906c10900b006f4d7002e66mr23677574ejc.738.1653376933122; Tue, 24 May 2022 00:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653376933; cv=none; d=google.com; s=arc-20160816; b=kMGirZDT54Om9Ghnw0MKS9IMceP9232R64FErNyNzjbbYwDHSE0XXTBa1XCJXnaBFj hisKA4m6Cg0X17XX3bICQHwV9Mftfzs+aMl8BzaCGHLs6EdmVYRJ93sLg99hKPnocR8H DrZAdHfimoa10tRyJ6j/YijVbW3mG9y8IvqV0jIzrbLdAGxnsGqy7jv/KvUZT5n3vHNg Wj+qJ2jYkGAS6cwcIIp9n71jRFcJf0SElCO+YvjW0GI20D7fRqvBLIv8hSUU1b2ZpJsS MVVNnEzIlMKY7BJ7enPQfZBPYUehAYZuCSYClQ+P7B1VG5PezqsWORf8CyVVIqx+HsQ5 btgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QPdz4Uq5UszR9Ty6Vs3RQzHIRJfFH7F3bUFKKuZWDHs=; b=Mui7/09hKEo2HWD+3vRCBMpuWchcpkCcfKl+MVcrKobTxRa8Vg9yQKdj34fwb9VNhE NC8zgztXgBtu7+Xo2IJkBBwjRW7liSG8FkfhPN/5f9oH7HayCcWDoYIVzBX+TC2FsU2g VnogEA9TR3f+R46Kx5u0pCw3w2S/efk6xXxjF8vpJgAWU+P2KZYNepkhkepWGjDIwpXV rDJUVNGn7MtbldhiBHZYsEGGWO3uOrNW1DQkTT1Y+A65n0BDEjShNrhTYGfz7cEz3770 yslHJyuZQkqFFZTSesAYJUNBFSTiGgDttHrIUYInu44C9XM6aB29RUEoYr1FHo04gtty 8VJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QRDrguPm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht21-20020a170907609500b006f3977fd205si17522691ejc.785.2022.05.24.00.21.46; Tue, 24 May 2022 00:22:13 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QRDrguPm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbiEXDG2 (ORCPT + 99 others); Mon, 23 May 2022 23:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbiEXDG0 (ORCPT ); Mon, 23 May 2022 23:06:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE326C57F; Mon, 23 May 2022 20:06:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 899AFB810BF; Tue, 24 May 2022 03:06:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51E3AC385AA; Tue, 24 May 2022 03:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653361583; bh=GGALU1orpB9Ze7CcmithKrs2KKURm55Ba+b50l3Rk4Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QRDrguPmh8T2cyV8CGha0jK30XmFVpKLFUFRIoRCx+47i1rE3g6meHXWovzkXA12I z+dB1d2f0zDUXf0tSQ7omrCW9DHfPtXCvtdHFOWpQwVIOA1XzQWYP34cE3M+v6FoIq wsSJASY0urk6w2EhApwoIeaDh0awh8vcsRW9fE4teqZBMCmQIa6ll16rCNfd/NjU8S 9USx3bpWtECrlas3cRKOs68Qw0JKgbKFDvxAX+uhERQ3CT80UXR6p2lCOVaufhCi0v Ai6UBxTRBJaETDLbKsIXeifBmV3MxPAe/HLlUvwZq1tqTSXunGKlvylxxwSL1a8xxp +RmcO+d5co16w== Received: by mail-vs1-f46.google.com with SMTP id i186so16913949vsc.9; Mon, 23 May 2022 20:06:23 -0700 (PDT) X-Gm-Message-State: AOAM531BvERJSkRJ3fulJxlhDs6OE0kUhk3a7nLRNXIR3LKQx5Oc+LBK Uv1p7kN2KBU4X4084snNTtswqB4ONDSn9KsTrZM= X-Received: by 2002:a67:f58f:0:b0:335:d1e6:d5d3 with SMTP id i15-20020a67f58f000000b00335d1e6d5d3mr9605080vso.16.1653361582191; Mon, 23 May 2022 20:06:22 -0700 (PDT) MIME-Version: 1.0 References: <1653360644-28872-1-git-send-email-baihaowen@meizu.com> In-Reply-To: <1653360644-28872-1-git-send-email-baihaowen@meizu.com> From: Huacai Chen Date: Tue, 24 May 2022 11:06:15 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: take size of pointed value, not pointer To: Haowen Bai Cc: Ard Biesheuvel , linux-efi , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, Haowen, On Tue, May 24, 2022 at 10:52 AM Haowen Bai wrote: > > Sizeof a pointer-typed expression returns the size of the pointer, not > that of the pointed data. Your patch is correct, but the original patch hasn't been upstream, I don't know how to handle it. > > 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 >