summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
diff options
context:
space:
mode:
authorSrirangan <smadhavan@nvidia.com>2018-08-27 01:59:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-29 11:59:35 -0400
commite3710e5431d8f14f1b8c2812f5c1aeeb7bdaac1c (patch)
tree8a6498b12e10f6b391d3c5dd7c6ac7b340ca60b4 /drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
parent2f97e683feed3c3ba3c8722c4f6ab7466bcef0c0 (diff)
gpu: nvgpu: gp106: Fix MISRA 15.6 violations
MISRA Rule-15.6 requires that all if-else blocks be enclosed in braces, including single statement blocks. Fix errors due to single statement if blocks without braces, introducing the braces. JIRA NVGPU-671 Change-Id: I8493274995ed8de526902dd0ca0808b2972e28aa Signed-off-by: Srirangan <smadhavan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1796806 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_arb_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_arb_gp106.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
index 5f969e79..ca8015d6 100644
--- a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c
@@ -55,20 +55,24 @@ int gp106_get_arbiter_clk_range(struct gk20a *g, u32 api_domain,
55 55
56 p5_info = pstate_get_clk_set_info(g, 56 p5_info = pstate_get_clk_set_info(g,
57 CTRL_PERF_PSTATE_P5, clkwhich); 57 CTRL_PERF_PSTATE_P5, clkwhich);
58 if (!p5_info) 58 if (!p5_info) {
59 return -EINVAL; 59 return -EINVAL;
60 }
60 61
61 p0_info = pstate_get_clk_set_info(g, 62 p0_info = pstate_get_clk_set_info(g,
62 CTRL_PERF_PSTATE_P0, clkwhich); 63 CTRL_PERF_PSTATE_P0, clkwhich);
63 if (!p0_info) 64 if (!p0_info) {
64 return -EINVAL; 65 return -EINVAL;
66 }
65 67
66 limit_min_mhz = p5_info->min_mhz; 68 limit_min_mhz = p5_info->min_mhz;
67 /* WAR for DVCO min */ 69 /* WAR for DVCO min */
68 if (api_domain == CTRL_CLK_DOMAIN_GPC2CLK) 70 if (api_domain == CTRL_CLK_DOMAIN_GPC2CLK) {
69 if ((pfllobjs->max_min_freq_mhz) && 71 if ((pfllobjs->max_min_freq_mhz) &&
70 (pfllobjs->max_min_freq_mhz >= limit_min_mhz)) 72 (pfllobjs->max_min_freq_mhz >= limit_min_mhz)) {
71 limit_min_mhz = pfllobjs->max_min_freq_mhz + 1; 73 limit_min_mhz = pfllobjs->max_min_freq_mhz + 1;
74 }
75 }
72 76
73 *min_mhz = limit_min_mhz; 77 *min_mhz = limit_min_mhz;
74 *max_mhz = p0_info->max_mhz; 78 *max_mhz = p0_info->max_mhz;
@@ -97,8 +101,9 @@ int gp106_get_arbiter_clk_default(struct gk20a *g, u32 api_domain,
97 101
98 p0_info = pstate_get_clk_set_info(g, 102 p0_info = pstate_get_clk_set_info(g,
99 CTRL_PERF_PSTATE_P0, clkwhich); 103 CTRL_PERF_PSTATE_P0, clkwhich);
100 if (!p0_info) 104 if (!p0_info) {
101 return -EINVAL; 105 return -EINVAL;
106 }
102 107
103 *default_mhz = p0_info->max_mhz; 108 *default_mhz = p0_info->max_mhz;
104 109