mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 11:03:41 +00:00
hv:treewide:fix multiple MISRAC violations
MISRAC has requirements about literal value requires a U suffix and signed/unsigned conversion with cast. This patch is used to solve these violations. v1->v2 *Drop the cast of sz from uint32_t to int32_t, the signed/unsigned violation of nchars will be solved by other patch together with printf/sprintf/console/vuart/uart code. *Delete the unnecessary L suffix of shifting operand. Tracked-On: #861 Signed-off-by: Junjun Shan <junjun.shan@intel.com> Reviewed by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
#define SHARED_BUFFER_H
|
||||
|
||||
#define SBUF_MAGIC 0x5aa57aa71aa13aa3UL
|
||||
#define SBUF_MAX_SIZE (1 << 22)
|
||||
#define SBUF_HEAD_SIZE 64
|
||||
#define SBUF_MAX_SIZE (1UL << 22U)
|
||||
#define SBUF_HEAD_SIZE 64U
|
||||
|
||||
/* sbuf flags */
|
||||
#define OVERRUN_CNT_EN (1 << 0) /* whether overrun counting is enabled */
|
||||
#define OVERWRITE_EN (1 << 1) /* whether overwrite is enabled */
|
||||
#define OVERRUN_CNT_EN (1U << 0U) /* whether overrun counting is enabled */
|
||||
#define OVERWRITE_EN (1U << 1U) /* whether overwrite is enabled */
|
||||
|
||||
/**
|
||||
* (sbuf) head + buf (store (ele_num - 1) elements at most)
|
||||
|
Reference in New Issue
Block a user