diff mbox series

mm: adjust _xvrealloc() declaration

Message ID a62146c9-ca82-4024-b5fa-fd3129f308fd@suse.com (mailing list archive)
State New
Headers show
Series mm: adjust _xvrealloc() declaration | expand

Commit Message

Jan Beulich Nov. 11, 2024, 12:53 p.m. UTC
... 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.

Comments

Andrew Cooper Nov. 11, 2024, 12:58 p.m. UTC | #1
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>
diff mbox series

Patch

--- 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)