mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-24 09:29:16 +00:00
hv: treewide: fix 'Use of function like macro'
- convert function like macros to inline functions based on MISRA-C requirement - remove some unused and duplicated macros Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -7,14 +7,6 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
/** Add an offset (in bytes) to an (base)address.
|
||||
*
|
||||
* @param addr Baseaddress
|
||||
* @param off Offset
|
||||
* @return Returns baseaddress + offset in bytes.
|
||||
*/
|
||||
#define ADD_OFFSET(addr, off) (void *)(((uint8_t *)(addr))+(off))
|
||||
|
||||
#define offsetof(st, m) __builtin_offsetof(st, m)
|
||||
|
||||
/** Roundup (x/y) to ( x/y + (x%y) ? 1 : 0) **/
|
||||
|
||||
Reference in New Issue
Block a user