gpu: nvgpu: common/pmu: fix compile error of new compile flags

It's preparing to add bellow CFLAGS:
    -Werror -Wall -Wextra \
    -Wmissing-braces -Wpointer-arith -Wundef \
    -Wconversion -Wsign-conversion \
    -Wformat-security \
    -Wmissing-declarations -Wredundant-decls -Wimplicit-fallthrough

Jira GVSCI-11640

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Change-Id: Ide3ab484924bd5be976a9f335b55b136575ce428
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2555055
Reviewed-by: Shashank Singh <shashsingh@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Richard Zhao
2021-07-06 21:26:47 -07:00
committed by mobile promotions
parent a3ed73a57c
commit 851666b632
45 changed files with 313 additions and 98 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -100,6 +100,8 @@ static struct pmu_board_obj *construct_pwr_device(struct gk20a *g,
struct pwr_device_ina3221 *pwrdev;
struct pwr_device_ina3221 *ina3221 = (struct pwr_device_ina3221*)pargs;
(void)type;
pwrdev = nvgpu_kzalloc(g, pargs_size);
if (pwrdev == NULL) {
return NULL;
@@ -281,7 +283,7 @@ static int devinit_get_pwr_device_table(struct gk20a *g,
}
status = boardobjgrp_objinsert(&ppwrdeviceobjs->super.super,
obj_tmp, obj_index);
obj_tmp, (u8)obj_index);
if (status != 0) {
nvgpu_err(g,