Skip to contentSkip to conversation

x86: correct scrub_page_{hot,cold}() prototypes

PATCH In review Jan Beulich 2 participants 3 messages Jul 23, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: correct scrub_page_{hot,cold}() prototypes

... to be in line with Misra rule 8.2 requirements.

Fixes 6ff0cfbfd4f7 ("mm: allow page scrubbing routine(s) to be arch controlled")

---
The offending patch had been pending for far longer than we care about Misra, and hence at the time of writing I didn't pay attention. And then I never looked again. I'm sorry.

xen/arch/x86/include/asm/page.h +2 -2
@@ -227,8 +227,8 @@ void copy_page_sse2(void *to, const void
 #define copy_page(_t, _f)   copy_page_sse2(_t, _f)
 
 #ifdef CONFIG_DEBUG
-void scrub_page_hot(void *);
-void scrub_page_cold(void *);
+void scrub_page_hot(void *ptr);
+void scrub_page_cold(void *ptr);
 #endif
 
 /* Convert between Xen-heap virtual addresses and machine addresses. */
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

... to be in line with Misra rule 8.2 requirements.

Fixes 6ff0cfbfd4f7 ("mm: allow page scrubbing routine(s) to be arch controlled")
Quoted 5 lines

---
The offending patch had been pending for far longer than we care about Misra, and hence at the time of writing I didn't pay attention. And then I never looked again. I'm sorry.

Ah, sorry, I didn't notice your patch, I just sent basically an identical one, feel free to disregard it.

Quoted 14 lines
xen/arch/x86/include/asm/page.h +2 -2
@@ -227,8 +227,8 @@ void copy_page_sse2(void *to, const void
 #define copy_page(_t, _f)   copy_page_sse2(_t, _f)
 
 #ifdef CONFIG_DEBUG
-void scrub_page_hot(void *);
-void scrub_page_cold(void *);
+void scrub_page_hot(void *ptr);
+void scrub_page_cold(void *ptr);
 #endif
 
 /* Convert between Xen-heap virtual addresses and machine addresses. 

*/

Signature · 4 lines
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
#2 lore raw
Quoted 8 lines · Nicola Vetrini
Quoted 5 lines · Jan Beulich

... to be in line with Misra rule 8.2 requirements.

Fixes 6ff0cfbfd4f7 ("mm: allow page scrubbing routine(s) to be arch

controlled")

Thanks.

Quoted 8 lines
Quoted 5 lines

---
The offending patch had been pending for far longer than we care about Misra, and hence at the time of writing I didn't pay attention. And then
I never looked again. I'm sorry.

Ah, sorry, I didn't notice your patch, I just sent basically an identical one, feel free to disregard it.

I've seen it, but indeed I prefer to put in mine. "pg" is what we more commonly use for struct page_info * type variables / parameters.

Jan