]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
efi/libstub: remove unnecessary cmd_line_len from efi_convert_cmdline()
authorJonathan Marek <jonathan@marek.ca>
Sun, 13 Oct 2024 05:11:57 +0000 (01:11 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 15 Oct 2024 18:04:11 +0000 (20:04 +0200)
commitade7ccba2d647fced0c1f5f290705dcab14b674e
treef925a7ee92fa5bc2c669a6c0c90acd9584d56fad
parentaacfa0ef247b0130b7a98bb52378f8cd727a66ca
efi/libstub: remove unnecessary cmd_line_len from efi_convert_cmdline()

efi_convert_cmdline() always sets cmdline_size to at least 1 on success,
so the "cmdline_size > 0" does nothing and can be removed (the intent
was to avoid parsing an empty string, but there is nothing wrong with
parsing an empty string, it is only making boot negligibly slower).

Then the cmd_line_len argument to efi_convert_cmdline can be removed
because there is nothing left using it.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/efi-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/x86-stub.c