diff mbox series

efi/x86: libstub: remove unused variables

Message ID 20220907023255.35237-1-chenzhang@kylinos.cn
State New
Headers show
Series efi/x86: libstub: remove unused variables | expand

Commit Message

chen zhang Sept. 7, 2022, 2:32 a.m. UTC
The variable "has_system_memory" is unused in
function ‘adjust_memory_range_protection’, remove it.

Signed-off-by: chen zhang <chenzhang@kylinos.cn>
---
 drivers/firmware/efi/libstub/x86-stub.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Evgeniy Baskov Sept. 8, 2022, 8:42 a.m. UTC | #1
On 2022-09-07 05:32, chen zhang wrote:
> 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
Evgeniy Baskov Sept. 8, 2022, 8:48 a.m. UTC | #2
On 2022-09-08 11:43, Ard Biesheuvel wrote:
> On Thu, 8 Sept 2022 at 10:42, Evgeniy Baskov <baskov@ispras.ru> wrote:
>> 
>> On 2022-09-07 05:32, chen zhang wrote:
>> > 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?

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
Evgeniy Baskov Sept. 8, 2022, 9:03 a.m. UTC | #3
On 2022-09-08 11:56, Ard Biesheuvel wrote:
> 
> 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
diff mbox series

Patch

diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 05ae8bcc9d67..43ca665af610 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -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;