efi/riscv: Remove the useless failure return message print
PATCH 1/1 efi/riscv: Remove the useless failure return message print
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.
--- drivers/firmware/efi/riscv-runtime.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/firmware/efi/riscv-runtime.c +1 -9
@@ -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))
Signature · 1 line
2.20.1
Quoted 3 lines · Qiang Ma
In the
efi_create_mapping()inarch/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
Quoted 1 line
Signed-off-by Qiang Ma <[email protected]>
Ard Biesheuvel
maintainerQuoted 9 lines · Yao Zi
Quoted 3 lines · Qiang Ma
In the
efi_create_mapping()inarch/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.
Quoted 7 lines · Ard Biesheuvel
Quoted 6 lines · Yao Zi
Quoted 3 lines · Qiang Ma
In the
efi_create_mapping()inarch/riscv/kernel/efi.c, the return value is always 0, and this debug message is unnecessary. So, remove it.
Quoted 5 lines
Quoted 3 lines
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
Paul Walmsley
maintainerQuoted 5 lines · Qiang Ma
In the
efi_create_mapping()inarch/riscv/kernel/efi.c, the return value is always 0, and this debug message is unnecessary. So, remove it.Signed-off-by Qiang Ma <[email protected]>
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
Quoted 11 lines · Paul Walmsley
Quoted 5 lines · Qiang Ma
In the
efi_create_mapping()inarch/riscv/kernel/efi.c, the return value is always 0, and this debug message is unnecessary. So, remove it.Signed-off-by Qiang Ma <[email protected]>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?
Quoted 7 lines
Thanks for your patch,
- Paul
Quoted 11 lines · Paul Walmsley
Quoted 5 lines · Qiang Ma
In the
efi_create_mapping()inarch/riscv/kernel/efi.c, the return value is always 0, and this debug message is unnecessary. So, remove it.Signed-off-by Qiang Ma <[email protected]>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?
Quoted 7 lines
Thanks for your patch,
- Paul
Ard Biesheuvel
maintainerQuoted 9 lines · Qiang Ma
Quoted 6 lines · Paul Walmsley
Quoted 4 lines · Qiang Ma
In the
efi_create_mapping()inarch/riscv/kernel/efi.c, the return value is always 0, and this debug message is unnecessary. So, remove it.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Qiang Ma <[email protected]>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