Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2658757ioo; Tue, 24 May 2022 03:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8rBEwcJO7OuE1UZcRPFJVUK4WqjfJsARC1fh+J+BEl0dAtqPLcJYkcrd07s/kXfoGrXBY X-Received: by 2002:a17:902:dad1:b0:161:a747:f962 with SMTP id q17-20020a170902dad100b00161a747f962mr27327075plx.32.1653386883050; Tue, 24 May 2022 03:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653386883; cv=none; d=google.com; s=arc-20160816; b=S2XHSqz07Fz0CMbXO359T+eZa+eeSco6pDW8K/NzyTaiZcuj7fcCEwAK6inffbzRkA eUs/lOOIvlHSJ/okWE8w4LtrtbpgkIFfdJOhE8rgeL95Xeq6l0qhSRklIsX4V4kk5wSb 2ypxSmdMmN4eQdZXl2X5KF+KgYJbdMsZXv51Lbcn+vXvrkfVJfgrZeOHMI0nVdV/NBS6 u7xYrfBm8oHTyCUD1tpuA6+puIJXC+y24xrnt1v3Go6PzPVQe5eeuq2w1jW+3ApcVEY2 YjA16qSaQLq62C21h2RJmEDqyruxphz0gk5ikMyJHdtiS01+cvciF2b/nCoxiUsduehB 1tDA== 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=iXWvmSVKESUJiwkmv71YH9iosWmKeGSthQJUEa0FG04=; b=i5ooEuUVs2i5/oFPnCHRlSyN/xqFVdXg4Z1KTC+qZBW0EDtmBp2xLv3Ba/hVetK4J6 ndi/1Aq2sws8colPguuZM41PVtpoTdUC3QTH7E0YQZ3D5pRr1cL5dALqV3bFdykrzJxV IT6+3e55mxQ2lXym0QuHKokj6afas9l5RmOsdYYBL8RtJSh4GOEXav4RQ9JZy0v3hdAJ jodewaqw/top4A7WyhQiMxRFMcxevUhZx2Cwhz4ePIhxziyT8+nhOuAfLcEl7guABJtn qxOtJSK0P38gJdPhvk+yPe7jF5Qy4TBEMxeZJywZAPD8adShVFYkp5P8CmQrbbN62LkZ ekZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FWVVjlZh; 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 t190-20020a6381c7000000b003f5ef397b2esi13979601pgd.32.2022.05.24.03.07.43; Tue, 24 May 2022 03:08:03 -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=FWVVjlZh; 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 S234121AbiEXEDO (ORCPT + 99 others); Tue, 24 May 2022 00:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234119AbiEXEDM (ORCPT ); Tue, 24 May 2022 00:03:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5232A7091F; Mon, 23 May 2022 21:03:09 -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 dfw.source.kernel.org (Postfix) with ESMTPS id C79976137A; Tue, 24 May 2022 04:03:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32FCFC385AA; Tue, 24 May 2022 04:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653364988; bh=3chKRr/tcJf7V0ZhM12uWINmUPbaPhX99jsnzK4PsQ4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FWVVjlZh7TF6EkoTlVCE1awKjVx24DMcPqMerJX80FQ6htXzc3BAjqlDhF7j6MA7c OvoufoxysvpHjxIGafoj1h7a/IYGAay+KQ35M45KflnAea1b20jzMMBH7bs28pVUjS 8XGXb7QryJa5DRgeJD8/AX+tuRutrkwgYIoFsJq7gcclNfA7dFj0BvQ982AJnNDPai e2yVKdGFTOwB52W8OlgGU8DY5WkYD7/A0KoPi3YrLhgjFX9k4Ylh2Mv+GAvI4wVs7e uoLZiSFV9C0ZVQ0Ohr1slm2vnSEdFifbHz7XgH97lSWM8LPtUteCbA1rwWaBl+h0eo yBtiNWL2/BIqg== Received: by mail-vs1-f53.google.com with SMTP id j7so16272277vsj.7; Mon, 23 May 2022 21:03:08 -0700 (PDT) X-Gm-Message-State: AOAM531FiJKAHaEZHliuMQyOhhrtnXAPg95S+1D4QYwlFb3uNN/jrwlD pBrcjHoZ7NH6URH3WzoRrmllX9K8dwdgfmlQzEI= X-Received: by 2002:a67:f58f:0:b0:335:d1e6:d5d3 with SMTP id i15-20020a67f58f000000b00335d1e6d5d3mr9647693vso.16.1653364987161; Mon, 23 May 2022 21:03:07 -0700 (PDT) MIME-Version: 1.0 References: <1653360644-28872-1-git-send-email-baihaowen@meizu.com> In-Reply-To: From: Huacai Chen Date: Tue, 24 May 2022 12:03:00 +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 On Tue, May 24, 2022 at 11:06 AM Huacai Chen wrote: > > 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. I've squash your patch to the original one and add a Co-developed-by:, not sure it is the best solution. Thanks. > > > > > 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 > >