Skip to contentSkip to conversation

mm: adjust _xvrealloc() declaration

PATCH In review Jan Beulich 2 participants 2 messages Nov 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: adjust _xvrealloc() declaration

... to match its definition parameter-name-wise, to please Misra C:2012 Rule 8.3.

Fixes 9102fcd9579f ("mm: introduce xvmalloc() et al and use for grant table allocations")

---
While this gets the decl out of sync with _xrealloc(), changing the definition instead would be a more intrusive change to make: The function already has a "ptr" local variable, which would then need renaming first.

xen/include/xen/xvmalloc.h +1 -1
@@ -52,7 +52,7 @@ void xvfree(void *va);
 /* Underlying functions */
 void *_xvmalloc(size_t size, unsigned int align);
 void *_xvzalloc(size_t size, unsigned int align);
-void *_xvrealloc(void *ptr, size_t size, unsigned int align);
+void *_xvrealloc(void *va, size_t size, unsigned int align);
 
 static inline void *_xvmalloc_array(
     size_t size, unsigned int align, unsigned long num)