mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +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:
@@ -828,7 +828,7 @@ int32_t hcall_setup_hv_npk_log(struct vm *vm, uint64_t param)
|
||||
{
|
||||
struct hv_npk_log_param npk_param;
|
||||
|
||||
memset((void *)&npk_param, 0, sizeof(npk_param));
|
||||
memset((void *)&npk_param, 0U, sizeof(npk_param));
|
||||
|
||||
if (copy_from_gpa(vm, &npk_param, param, sizeof(npk_param)) != 0) {
|
||||
pr_err("%s: Unable copy param from vm\n", __func__);
|
||||
|
||||
Reference in New Issue
Block a user