[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/libelf: address violations of MISRA C:2012 Rules 8.2 and 8.3
commit ba78957d92b4ee122fb3a0d68fc7614f674e939b Author: Federico Serafini <federico.serafini@xxxxxxxxxxx> AuthorDate: Mon Sep 18 15:05:55 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Sep 18 15:05:55 2023 +0200 xen/libelf: address violations of MISRA C:2012 Rules 8.2 and 8.3 Add missing parameter names and make function declarations and definitions consistent. No functional change. Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/xen/libelf.h | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/xen/include/xen/libelf.h b/xen/include/xen/libelf.h index be47b0cc36..1c77e3df31 100644 --- a/xen/include/xen/libelf.h +++ b/xen/include/xen/libelf.h @@ -260,8 +260,8 @@ struct elf_binary { * str should be a HANDLE. */ -uint64_t elf_access_unsigned(struct elf_binary *elf, elf_ptrval ptr, - uint64_t offset, size_t size); +uint64_t elf_access_unsigned(struct elf_binary *elf, elf_ptrval base, + uint64_t moreoffset, size_t size); /* Reads a field at arbitrary offset and alignemnt */ uint64_t elf_round_up(struct elf_binary *elf, uint64_t addr); @@ -272,8 +272,10 @@ const char *elf_strval(struct elf_binary *elf, elf_ptrval start); const char *elf_strfmt(struct elf_binary *elf, elf_ptrval start); /* like elf_strval but returns "(invalid)" instead of NULL */ -void elf_memcpy_safe(struct elf_binary*, elf_ptrval dst, elf_ptrval src, size_t); -void elf_memset_safe(struct elf_binary*, elf_ptrval dst, int c, size_t); +void elf_memcpy_safe(struct elf_binary *elf, elf_ptrval dst, elf_ptrval src, + size_t size); +void elf_memset_safe(struct elf_binary *elf, elf_ptrval dst, int c, + size_t size); /* * Versions of memcpy and memset which arrange never to write * outside permitted areas. @@ -324,7 +326,8 @@ ELF_HANDLE_DECL(elf_sym) elf_sym_by_index(struct elf_binary *elf, unsigned index const char *elf_note_name(struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) note); /* may return NULL */ elf_ptrval elf_note_desc(struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) note); uint64_t elf_note_numeric(struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) note); -uint64_t elf_note_numeric_array(struct elf_binary *, ELF_HANDLE_DECL(elf_note), +uint64_t elf_note_numeric_array(struct elf_binary *elf, + ELF_HANDLE_DECL(elf_note) note, unsigned int unitsz, unsigned int idx); /* @@ -346,9 +349,10 @@ bool elf_phdr_is_loadable(struct elf_binary *elf, ELF_HANDLE_DECL(elf_phdr) phdr /* ------------------------------------------------------------------------ */ /* xc_libelf_loader.c */ -elf_errorstatus elf_init(struct elf_binary *elf, const char *image, size_t size); +elf_errorstatus elf_init(struct elf_binary *elf, const char *image_input, + size_t size); /* - * image and size must be correct. They will be recorded in + * image_input and size must be correct. They will be recorded in * *elf, and must remain valid while the elf is in use. */ #ifdef __XEN__ @@ -445,16 +449,16 @@ static inline int elf_xen_feature_get(int nr, uint32_t * addr) return !!(addr[nr >> 5] & (1 << (nr & 31))); } -int elf_xen_parse_features(const char *features, - uint32_t *supported, - uint32_t *required); -int elf_xen_parse_note(struct elf_binary *elf, - struct elf_dom_parms *parms, - ELF_HANDLE_DECL(elf_note) note); -int elf_xen_parse_guest_info(struct elf_binary *elf, - struct elf_dom_parms *parms); -int elf_xen_parse(struct elf_binary *elf, - struct elf_dom_parms *parms, bool hvm); +elf_errorstatus elf_xen_parse_features(const char *features, + uint32_t *supported, + uint32_t *required); +elf_errorstatus elf_xen_parse_note(struct elf_binary *elf, + struct elf_dom_parms *parms, + ELF_HANDLE_DECL(elf_note) note); +elf_errorstatus elf_xen_parse_guest_info(struct elf_binary *elf, + struct elf_dom_parms *parms); +elf_errorstatus elf_xen_parse(struct elf_binary *elf, + struct elf_dom_parms *parms, bool hvm); static inline void *elf_memcpy_unchecked(void *dest, const void *src, size_t n) { return memcpy(dest, src, n); } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |