2022-11-16 09:06:50

by Verma, Vishal L

[permalink] [raw]
Subject: [PATCH 1/2] ACPI: HMAT: remove unnecessary variable initialization

In hmat_register_target_initiators(), the variable 'best' gets
initialized in the outer per-locality-type for loop. The initialization
just before setting up 'Access 1' targets was unnecessary. Remove it.

Cc: Rafael J. Wysocki <[email protected]>
Cc: Liu Shixin <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
---
drivers/acpi/numa/hmat.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
index 23f49a2f4d14..144a84f429ed 100644
--- a/drivers/acpi/numa/hmat.c
+++ b/drivers/acpi/numa/hmat.c
@@ -644,7 +644,6 @@ static void hmat_register_target_initiators(struct memory_target *target)
/* Access 1 ignores Generic Initiators */
bitmap_zero(p_nodes, MAX_NUMNODES);
list_sort(p_nodes, &initiators, initiator_cmp);
- best = 0;
for (i = WRITE_LATENCY; i <= READ_BANDWIDTH; i++) {
loc = localities_types[i];
if (!loc)
--
2.38.1



2022-11-16 13:22:11

by Kirill A. Shutemov

[permalink] [raw]
Subject: Re: [PATCH 1/2] ACPI: HMAT: remove unnecessary variable initialization

On Wed, Nov 16, 2022 at 12:57:35AM -0700, Vishal Verma wrote:
> In hmat_register_target_initiators(), the variable 'best' gets
> initialized in the outer per-locality-type for loop. The initialization
> just before setting up 'Access 1' targets was unnecessary. Remove it.
>
> Cc: Rafael J. Wysocki <[email protected]>
> Cc: Liu Shixin <[email protected]>
> Cc: Dan Williams <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>

Acked-by: Kirill A. Shutemov <[email protected]>


--
Kiryl Shutsemau / Kirill A. Shutemov