[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H4Qcj9y6opY3WMTbE8myo77fYRb8Z42C+MPYuScz8N67g@mail.gmail.com>
Date: Tue, 24 May 2022 12:03:00 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Haowen Bai <baihaowen@...zu.com>
Cc: Ard Biesheuvel <ardb@...nel.org>,
linux-efi <linux-efi@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] LoongArch: take size of pointed value, not pointer
On Tue, May 24, 2022 at 11:06 AM Huacai Chen <chenhuacai@...nel.org> wrote:
>
> Hi, Haowen,
>
> On Tue, May 24, 2022 at 10:52 AM Haowen Bai <baihaowen@...zu.com> 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 <baihaowen@...zu.com>
> > ---
> > 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
> >
Powered by blists - more mailing lists