... 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")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
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.
--- a/xen/include/xen/xvmalloc.h
+++ b/xen/include/xen/xvmalloc.h
@@ -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)
On 11/11/2024 12:53 pm, Jan Beulich wrote:
> ... 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")
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
© 2016 - 2025 Red Hat, Inc.