efi/libstub: make memory protection warnings include newlines.

Message ID 20221018205118.3756594-1-pjones@redhat.com
State New
Headers
Series efi/libstub: make memory protection warnings include newlines. |

Commit Message

Peter Jones Oct. 18, 2022, 8:51 p.m. UTC
  efi_warn() doesn't put newlines on messages, and that makes reading
warnings without newlines hard to do.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 drivers/firmware/efi/libstub/mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Ard Biesheuvel Oct. 19, 2022, 7:44 a.m. UTC | #1
On Tue, 18 Oct 2022 at 22:51, Peter Jones <pjones@redhat.com> wrote:
>
> efi_warn() doesn't put newlines on messages, and that makes reading
> warnings without newlines hard to do.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>

OK, so this applies on top of Evgeniy's series, right? Do we need a
version for 6.1-rc1 ?

> ---
>  drivers/firmware/efi/libstub/mem.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c
> index 4d6c7f4fb7e..1b874096109 100644
> --- a/drivers/firmware/efi/libstub/mem.c
> +++ b/drivers/firmware/efi/libstub/mem.c
> @@ -293,7 +293,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start,
>                                 rounded_end - rounded_start,
>                                 attr_clear);
>         if (status != EFI_SUCCESS) {
> -               efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx",
> +               efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx\n",
>                          (unsigned long)rounded_start,
>                          (unsigned long)rounded_end,
>                          status);
> @@ -306,7 +306,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start,
>                                 rounded_end - rounded_start,
>                                 attributes);
>         if (status != EFI_SUCCESS) {
> -               efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx",
> +               efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx\n",
>                          (unsigned long)rounded_start,
>                          (unsigned long)rounded_end,
>                          status);
> --
> 2.37.1
>
  

Patch

diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c
index 4d6c7f4fb7e..1b874096109 100644
--- a/drivers/firmware/efi/libstub/mem.c
+++ b/drivers/firmware/efi/libstub/mem.c
@@ -293,7 +293,7 @@  efi_status_t efi_adjust_memory_range_protection(unsigned long start,
 				rounded_end - rounded_start,
 				attr_clear);
 	if (status != EFI_SUCCESS) {
-		efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx",
+		efi_warn("Failed to clear memory attributes at [%08lx,%08lx]: %lx\n",
 			 (unsigned long)rounded_start,
 			 (unsigned long)rounded_end,
 			 status);
@@ -306,7 +306,7 @@  efi_status_t efi_adjust_memory_range_protection(unsigned long start,
 				rounded_end - rounded_start,
 				attributes);
 	if (status != EFI_SUCCESS) {
-		efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx",
+		efi_warn("Failed to set memory attributes at [%08lx,%08lx]: %lx\n",
 			 (unsigned long)rounded_start,
 			 (unsigned long)rounded_end,
 			 status);