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"),
@@ -217,7 +217,7 @@ static int volt_get_voltage_device_table_1x_psv(struct gk20a *g,
u8 ext_dev_idx;
u8 steps;
u8 volt_domain = 0;
struct voltage_device_pwm_entry pwm_entry = { { 0 } };
struct voltage_device_pwm_entry pwm_entry = { };
ptmp_dev = nvgpu_kzalloc(g, sizeof(struct voltage_device_pwm));
if (ptmp_dev == NULL) {