Skip to contentSkip to conversation

efi/x86: libstub: remove unused variables

PATCH In review chen zhang 3 participants 6 messages Sep 7, 2022 – Sep 8, 2022 EFI

lore
Share & tools
lore

chen zhang

author
#0 lore raw

PATCH 1/1 efi/x86: libstub: remove unused variables

The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it.

---
 drivers/firmware/efi/libstub/x86-stub.c | 1 -
 1 file changed, 1 deletion(-)
drivers/firmware/efi/libstub/x86-stub.c +0 -1
index 05ae8bcc9d67..43ca665af610 100644
@@ -220,7 +220,6 @@ adjust_memory_range_protection(unsigned long start, unsigned long size)
 	unsigned long end, next;
 	unsigned long rounded_start, rounded_end;
 	unsigned long unprotect_start, unprotect_size;
-	int has_system_memory = 0;
 
 	if (efi_dxe_table == NULL)
 		return;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · chen zhang

The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it.

Thanks for pointing out.
Will change that in v2.

Thanks,
Evgeniy Baskov

maintainer
#2 lore raw
Quoted 9 lines · Evgeniy Baskov
Quoted 3 lines · chen zhang

The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it.

Thanks for pointing out.
Will change that in v2.

v2 of what? Isn't this code already in mainline?

#3 lore raw
Quoted 7 lines · Ard Biesheuvel
Quoted 6 lines · Evgeniy Baskov
Quoted 3 lines · chen zhang

The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it.

Quoted 5 lines
Quoted 3 lines

Thanks for pointing out.
Will change that in v2.

v2 of what? Isn't this code already in mainline?

Oh, right.

There are just more patches pending that change that function. I can do that via separate patch later today, I guess.

Thanks,
Evgeniy Baskov

maintainer
#4 lore raw
Quoted 13 lines · Evgeniy Baskov
Quoted 11 lines · Ard Biesheuvel
Quoted 9 lines · Evgeniy Baskov
Quoted 3 lines · chen zhang

The variable "has_system_memory" is unused in function ‘adjust_memory_range_protection’, remove it.

Thanks for pointing out.
Will change that in v2.

Quoted 8 lines
Quoted 1 line

v2 of what? Isn't this code already in mainline?

Oh, right.

There are just more patches pending that change that function. I can do that via separate patch later today, I guess.

But Chen Zhang already sent a patch that fixes this, so why bother?

I will queue this as a fix. Please rebase your patches on top if this causes a conflict.

Thanks,

#5 lore raw
Quoted 5 lines · Ard Biesheuvel

But Chen Zhang already sent a patch that fixes this, so why bother?

I will queue this as a fix. Please rebase your patches on top if this causes a conflict.

Yes, I meant that I will rebase another series on top of this change in v2. Sorry for the poor wording. (And not today, I guess)

Thanks,
Evgeniy Baskov