From mboxrd@z Thu Jan 1 00:00:00 1970 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 4F561C43217 for ; Tue, 24 May 2022 11:41:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236165AbiEXLlw (ORCPT ); Tue, 24 May 2022 07:41:52 -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-Google-Smtp-Source: ABdhPJzCJ2u9jysf3Y3UYbKCx2FPWfsiC1PXV3/DgImJFn80toQja8XBmo+Xx7+ajGyarrIJNUtFoQlBmChBHi8+Zs0= 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" 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 > > >