Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3512459ioo; Wed, 25 May 2022 02:13:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg+52/1iAyfttol+BkIfyqefEoT23ATfxIpCwNR7+V55oRMWK3GGUbUDAM+mSK+1XtcBqj X-Received: by 2002:a17:90b:4b0c:b0:1e0:96b:c3fe with SMTP id lx12-20020a17090b4b0c00b001e0096bc3femr9330937pjb.212.1653470017094; Wed, 25 May 2022 02:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653470017; cv=none; d=google.com; s=arc-20160816; b=QuHZbhiNdB0kvIWVJJJ+ZVp8wNldTT9lY/i4peHpXXypFvC6ycog1KC5Bnwo/s6DW1 MKXS8cZhuZo5EqoQHVYQG/9tODjHOhTkmWCkv32PymuQOoOqGtBsVgh9fr1D2HLnV2/k pYCjV7ExWfYnoHCDS7cl5BJ/QMUSy9ZoNYhbXlVc0kVZLWcN6rREXCJVWmTlHrcjf5+K PyAy2HXsZkMHDYIAWg5Z5wdgbAJYIj8OQuRx/zhpAPho9EGVpFiL7yX4qlSozIDbVqgy xX06m0/ImwI6SOqK3qZuUrmVYvE0+AXol58p3R5PBYy1XNTqNPFt/PcAh84RVidNXcgl 7F9Q== 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=tNFlhjsZgezAgRpfajeivxUWkvQf/65IaT1+roWOquc=; b=oYx4pg+zIkv03XVLeoH7ZTgwTSKxcs9O9D1mgmJLklr3qdAPlBJCOVDiKPl/IEX5oU BgTkGzAhMXvH0jPcRRhSIMgcgQnudird4CijFWSDR2DhI40bnXjQM7e+M7l/js6I4SZv 8IBuJturcawFQK5Gaf3xngCHyLhdZ5BcZ4cH4fiJiU58l0uKFgQ0EwlPBE44aAJFqnkl eE6O4MzwB1NVcrrAkWI1Q4oYKz+TCqAMSbg4RF3zWHcFubhOeHRz8YAdOIwRqmulwQeN IddAZCzd5h6zjK4uPICXQpkaU/Dq2eSfWLthNuV+hxfww6TA4DsyLysRVfmgAAJDQWtF YGkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VIvgCy9g; 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 12-20020a630b0c000000b003fa3e7a7968si11655107pgl.423.2022.05.25.02.13.23; Wed, 25 May 2022 02:13:37 -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=VIvgCy9g; 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 S235988AbiEXLlv (ORCPT + 99 others); Tue, 24 May 2022 07:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236945AbiEXLlr (ORCPT ); Tue, 24 May 2022 07:41:47 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65E8E2B; Tue, 24 May 2022 04:41:13 -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 sin.source.kernel.org (Postfix) with ESMTPS id CADF7CE19E5; Tue, 24 May 2022 11:41:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F1F5C34113; Tue, 24 May 2022 11:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653392467; bh=xyWOEhDS7IyLf1PZjyOsltV+5LA6MRIE8wzpbN6RO0s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VIvgCy9gSHU5nSmAvmpaFooT8IVlIoVYtfN8vlLvB2J5MQiwXn1CsnZAP4IIUeuGh W62P/g2ArPB6jVng0iBr+zRO3vAscMZ+kaP8SMBnlbPrBzvNjjja+p1fWLlbzbjXNb +vR/ci7tlER5iez/aDsJfjXrLjUY+nvp6OKwaXhpuJht1dQXqwnkzLlQOdN5uLuP2V PRg/WwXWZysf6ZtLE9GhCrcyBiX1mgmLn1pg6kmpBjr70ez7KzglZWQeCZY/UnK/Hs hw1JSsDJvXc0wqD11glOK7qSsJLiPnlEd3dkZLwL/BFMFCXmQBVuaXY5cVYW1jbfgd //alJL979cQOg== Received: by mail-vs1-f43.google.com with SMTP id j7so5862472vsp.12; Tue, 24 May 2022 04:41:07 -0700 (PDT) X-Gm-Message-State: AOAM533Ml/z/pXFgsfrw3YyIkuGOd7TgG8ZuA871AF6T5WjYuvYBLzkZ XUQbAggIHauUKmCOx9VZktdEQHSv+95aLxWXB2Q= X-Received: by 2002:a67:ea4f:0:b0:328:1db4:d85c with SMTP id r15-20020a67ea4f000000b003281db4d85cmr10238947vso.20.1653392466187; Tue, 24 May 2022 04:41:06 -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 19:40:59 +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 12:03 PM Huacai Chen wrote: > > 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. I was suggested that a "Suggested-by" is suitable. https://lore.kernel.org/lkml/CAAhV-H6k=xC-fDYnwsqSeoj7QPPn8RAcR+waQMa8yTs5J-XOSg@mail.gmail.com/T/#t Huacai > > > > > > > > > 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 > > >