* [PATCH] efi/riscv: Remove the useless failure return message print
@ 2025-10-31 2:43 Qiang Ma
2025-10-31 4:12 ` Yao Zi
2025-11-26 0:27 ` Paul Walmsley
0 siblings, 2 replies; 8+ messages in thread
From: Qiang Ma @ 2025-10-31 2:43 UTC (permalink / raw)
To: ardb, pjw, palmer, aou, alex
Cc: linux-efi, linux-riscv, linux-kernel, Qiang Ma
In the efi_create_mapping() in arch/riscv/kernel/efi.c,
the return value is always 0, and this debug message
is unnecessary. So, remove it.
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
---
drivers/firmware/efi/riscv-runtime.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/firmware/efi/riscv-runtime.c b/drivers/firmware/efi/riscv-runtime.c
index fa71cd898120..4a2588358be2 100644
--- a/drivers/firmware/efi/riscv-runtime.c
+++ b/drivers/firmware/efi/riscv-runtime.c
@@ -36,20 +36,12 @@ static bool __init efi_virtmap_init(void)
init_new_context(NULL, &efi_mm);
for_each_efi_memory_desc(md) {
- phys_addr_t phys = md->phys_addr;
- int ret;
-
if (!(md->attribute & EFI_MEMORY_RUNTIME))
continue;
if (md->virt_addr == U64_MAX)
return false;
- ret = efi_create_mapping(&efi_mm, md);
- if (ret) {
- pr_warn(" EFI remap %pa: failed to create mapping (%d)\n",
- &phys, ret);
- return false;
- }
+ efi_create_mapping(&efi_mm, md);
}
if (efi_memattr_apply_permissions(&efi_mm, efi_set_mapping_permissions))
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-10-31 2:43 [PATCH] efi/riscv: Remove the useless failure return message print Qiang Ma
@ 2025-10-31 4:12 ` Yao Zi
2025-10-31 6:52 ` Ard Biesheuvel
2025-11-26 0:27 ` Paul Walmsley
1 sibling, 1 reply; 8+ messages in thread
From: Yao Zi @ 2025-10-31 4:12 UTC (permalink / raw)
To: Qiang Ma, ardb, pjw, palmer, aou, alex
Cc: linux-efi, linux-riscv, linux-kernel
On Fri, Oct 31, 2025 at 10:43:28AM +0800, Qiang Ma wrote:
> In the efi_create_mapping() in arch/riscv/kernel/efi.c,
> the return value is always 0, and this debug message
> is unnecessary. So, remove it.
Should we make efi_create_mapping() return void at the same time, if it
will never fail?
Regards,
Yao Zi
> Signed-off-by: Qiang Ma <maqianga@uniontech.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-10-31 4:12 ` Yao Zi
@ 2025-10-31 6:52 ` Ard Biesheuvel
2025-10-31 8:27 ` Yao Zi
0 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2025-10-31 6:52 UTC (permalink / raw)
To: Yao Zi
Cc: Qiang Ma, pjw, palmer, aou, alex, linux-efi, linux-riscv,
linux-kernel
On Fri, 31 Oct 2025 at 05:12, Yao Zi <ziyao@disroot.org> wrote:
>
> On Fri, Oct 31, 2025 at 10:43:28AM +0800, Qiang Ma wrote:
> > In the efi_create_mapping() in arch/riscv/kernel/efi.c,
> > the return value is always 0, and this debug message
> > is unnecessary. So, remove it.
>
> Should we make efi_create_mapping() return void at the same time, if it
> will never fail?
>
No.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-10-31 6:52 ` Ard Biesheuvel
@ 2025-10-31 8:27 ` Yao Zi
0 siblings, 0 replies; 8+ messages in thread
From: Yao Zi @ 2025-10-31 8:27 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Qiang Ma, pjw, palmer, aou, alex, linux-efi, linux-riscv,
linux-kernel
On Fri, Oct 31, 2025 at 07:52:10AM +0100, Ard Biesheuvel wrote:
> On Fri, 31 Oct 2025 at 05:12, Yao Zi <ziyao@disroot.org> wrote:
> >
> > On Fri, Oct 31, 2025 at 10:43:28AM +0800, Qiang Ma wrote:
> > > In the efi_create_mapping() in arch/riscv/kernel/efi.c,
> > > the return value is always 0, and this debug message
> > > is unnecessary. So, remove it.
> >
> > Should we make efi_create_mapping() return void at the same time, if it
> > will never fail?
> >
>
> No.
Oops, seems a silly question here. Sorry for the noise.
Best regards,
Yao Zi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-10-31 2:43 [PATCH] efi/riscv: Remove the useless failure return message print Qiang Ma
2025-10-31 4:12 ` Yao Zi
@ 2025-11-26 0:27 ` Paul Walmsley
2025-11-26 2:49 ` Qiang Ma
2025-11-26 2:52 ` Qiang Ma
1 sibling, 2 replies; 8+ messages in thread
From: Paul Walmsley @ 2025-11-26 0:27 UTC (permalink / raw)
To: Qiang Ma; +Cc: ardb, pjw, palmer, aou, alex, linux-efi, linux-riscv,
linux-kernel
On Fri, 31 Oct 2025, Qiang Ma wrote:
> In the efi_create_mapping() in arch/riscv/kernel/efi.c,
> the return value is always 0, and this debug message
> is unnecessary. So, remove it.
>
> Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Considering that Ard doesn't think efi_create_mapping() should be changed
to remove the return value, and that the ARM version of this code retains
the debug message, we should probably keep things the way they are. But
if you can get a Reviewed-by: or an Acked-by: from Ard, I'd take it.
Thanks for your patch,
- Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-11-26 0:27 ` Paul Walmsley
@ 2025-11-26 2:49 ` Qiang Ma
2025-11-26 2:52 ` Qiang Ma
1 sibling, 0 replies; 8+ messages in thread
From: Qiang Ma @ 2025-11-26 2:49 UTC (permalink / raw)
To: ardb, Paul Walmsley
Cc: ardb, palmer, aou, alex, linux-efi, linux-riscv, linux-kernel
在 2025/11/26 08:27, Paul Walmsley 写道:
> On Fri, 31 Oct 2025, Qiang Ma wrote:
>
>> In the efi_create_mapping() in arch/riscv/kernel/efi.c,
>> the return value is always 0, and this debug message
>> is unnecessary. So, remove it.
>>
>> Signed-off-by: Qiang Ma <maqianga@uniontech.com>
> Considering that Ard doesn't think efi_create_mapping() should be changed
> to remove the return value, and that the ARM version of this code retains
> the debug message, we should probably keep things the way they are. But
> if you can get a Reviewed-by: or an Acked-by: from Ard, I'd take it.
Hi, Ard, what are your suggestions for this patch?
Could you add a Reviewed-by: or an Acked-by: to this patch?
>
>
> Thanks for your patch,
>
> - Paul
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-11-26 0:27 ` Paul Walmsley
2025-11-26 2:49 ` Qiang Ma
@ 2025-11-26 2:52 ` Qiang Ma
2025-11-26 6:38 ` Ard Biesheuvel
1 sibling, 1 reply; 8+ messages in thread
From: Qiang Ma @ 2025-11-26 2:52 UTC (permalink / raw)
To: Paul Walmsley, Ard Biesheuvel
Cc: ardb, palmer, aou, alex, linux-efi, linux-riscv, linux-kernel
在 2025/11/26 08:27, Paul Walmsley 写道:
> On Fri, 31 Oct 2025, Qiang Ma wrote:
>
>> In the efi_create_mapping() in arch/riscv/kernel/efi.c,
>> the return value is always 0, and this debug message
>> is unnecessary. So, remove it.
>>
>> Signed-off-by: Qiang Ma <maqianga@uniontech.com>
> Considering that Ard doesn't think efi_create_mapping() should be changed
> to remove the return value, and that the ARM version of this code retains
> the debug message, we should probably keep things the way they are. But
> if you can get a Reviewed-by: or an Acked-by: from Ard, I'd take it.
Hi, Ard, what are your suggestions for this patch?
Could you add a Reviewed-by: or an Acked-by: to this patch?
>
>
> Thanks for your patch,
>
> - Paul
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/riscv: Remove the useless failure return message print
2025-11-26 2:52 ` Qiang Ma
@ 2025-11-26 6:38 ` Ard Biesheuvel
0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2025-11-26 6:38 UTC (permalink / raw)
To: Qiang Ma
Cc: Paul Walmsley, palmer, aou, alex, linux-efi, linux-riscv,
linux-kernel
On Wed, 26 Nov 2025 at 03:53, Qiang Ma <maqianga@uniontech.com> wrote:
>
>
> 在 2025/11/26 08:27, Paul Walmsley 写道:
> > On Fri, 31 Oct 2025, Qiang Ma wrote:
> >
> >> In the efi_create_mapping() in arch/riscv/kernel/efi.c,
> >> the return value is always 0, and this debug message
> >> is unnecessary. So, remove it.
> >>
> >> Signed-off-by: Qiang Ma <maqianga@uniontech.com>
> > Considering that Ard doesn't think efi_create_mapping() should be changed
> > to remove the return value, and that the ARM version of this code retains
> > the debug message, we should probably keep things the way they are. But
> > if you can get a Reviewed-by: or an Acked-by: from Ard, I'd take it.
> Hi, Ard, what are your suggestions for this patch?
>
> Could you add a Reviewed-by: or an Acked-by: to this patch?
I already queued this up in efi/next
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-11-26 6:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 2:43 [PATCH] efi/riscv: Remove the useless failure return message print Qiang Ma
2025-10-31 4:12 ` Yao Zi
2025-10-31 6:52 ` Ard Biesheuvel
2025-10-31 8:27 ` Yao Zi
2025-11-26 0:27 ` Paul Walmsley
2025-11-26 2:49 ` Qiang Ma
2025-11-26 2:52 ` Qiang Ma
2025-11-26 6:38 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox