2024-01-25 18:44:46

by Jason Andryuk

[permalink] [raw]
Subject: [PATCH] x86/mm/cpa-test: Correct length selection

The length of pages to modify corresponding to addr[i] is given in
len[i]. Remove the hard coded 1.

Signed-off-by: Jason Andryuk <[email protected]>
---
This is a typo, right? The other cases use len[i].

arch/x86/mm/pat/cpa-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pat/cpa-test.c b/arch/x86/mm/pat/cpa-test.c
index 3d2f7f0a6ed1..ad3c1feec990 100644
--- a/arch/x86/mm/pat/cpa-test.c
+++ b/arch/x86/mm/pat/cpa-test.c
@@ -183,7 +183,7 @@ static int pageattr_test(void)
break;

case 1:
- err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1);
+ err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1);
break;

case 2:
--
2.43.0