summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/ptimer/ptimer.c
diff options
context:
space:
mode:
authorSrirangan <smadhavan@nvidia.com>2018-08-20 05:13:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-23 00:55:49 -0400
commit3fbaee7099039eee84343027dd1ce20679c0c113 (patch)
tree0de4934723f58cad9cdcdb642927ffce0cfac6d8 /drivers/gpu/nvgpu/common/ptimer/ptimer.c
parent52305f0514d29e7fb2cb5e2154188e09faa3fe94 (diff)
gpu: nvgpu: common: 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: I4d9933c51a297a725f48cbb15520a70494d74aeb Signed-off-by: Srirangan <smadhavan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1800833 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/ptimer/ptimer.c')
-rw-r--r--drivers/gpu/nvgpu/common/ptimer/ptimer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/ptimer/ptimer.c b/drivers/gpu/nvgpu/common/ptimer/ptimer.c
index d5f9470d..3f3a5f9b 100644
--- a/drivers/gpu/nvgpu/common/ptimer/ptimer.c
+++ b/drivers/gpu/nvgpu/common/ptimer/ptimer.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -39,8 +39,9 @@ int nvgpu_get_timestamps_zipper(struct gk20a *g,
39 39
40 for (i = 0; i < count; i++) { 40 for (i = 0; i < count; i++) {
41 err = g->ops.ptimer.read_ptimer(g, &samples[i].gpu_timestamp); 41 err = g->ops.ptimer.read_ptimer(g, &samples[i].gpu_timestamp);
42 if (err) 42 if (err) {
43 return err; 43 return err;
44 }
44 45
45 samples[i].cpu_timestamp = nvgpu_hr_timestamp(); 46 samples[i].cpu_timestamp = nvgpu_hr_timestamp();
46 } 47 }