summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-12-12 03:10:08 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-19 18:40:36 -0500
commit92fe0007496fd42983a6849b4f8dd5bc7d124834 (patch)
tree8d8469893fa630f428ba5036c6c63475ccc822d6 /drivers/gpu/nvgpu/common
parent8efeebaac53265428848fd64545ca10a6fd6e601 (diff)
gpu: nvgpu: rename timeout_check to timeout_expired
Change "check" to "expired" in nvgpu_timeout_check* and append _expired to nvgpu_timeout_peek to clarify what the boolean-like return value means and thus avoid bugs. Bug 200260715 Change-Id: I47e097ee922e856005a79fa9e27eddb1c8d77f8b Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1269366 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/linux/timers.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/timers.c b/drivers/gpu/nvgpu/common/linux/timers.c
index e1e08f82..b7fe30f1 100644
--- a/drivers/gpu/nvgpu/common/linux/timers.c
+++ b/drivers/gpu/nvgpu/common/linux/timers.c
@@ -71,7 +71,7 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout,
71 return 0; 71 return 0;
72} 72}
73 73
74static int __nvgpu_timeout_check_msg_cpu(struct nvgpu_timeout *timeout, 74static int __nvgpu_timeout_expired_msg_cpu(struct nvgpu_timeout *timeout,
75 void *caller, 75 void *caller,
76 const char *fmt, va_list args) 76 const char *fmt, va_list args)
77{ 77{
@@ -97,7 +97,7 @@ static int __nvgpu_timeout_check_msg_cpu(struct nvgpu_timeout *timeout,
97 return 0; 97 return 0;
98} 98}
99 99
100static int __nvgpu_timeout_check_msg_retry(struct nvgpu_timeout *timeout, 100static int __nvgpu_timeout_expired_msg_retry(struct nvgpu_timeout *timeout,
101 void *caller, 101 void *caller,
102 const char *fmt, va_list args) 102 const char *fmt, va_list args)
103{ 103{
@@ -125,7 +125,7 @@ static int __nvgpu_timeout_check_msg_retry(struct nvgpu_timeout *timeout,
125} 125}
126 126
127/** 127/**
128 * __nvgpu_timeout_check_msg - Check if a timeout has expired. 128 * __nvgpu_timeout_expired_msg - Check if a timeout has expired.
129 * 129 *
130 * @timeout - The timeout to check. 130 * @timeout - The timeout to check.
131 * @caller - Address of the caller of this function. 131 * @caller - Address of the caller of this function.
@@ -136,7 +136,7 @@ static int __nvgpu_timeout_check_msg_retry(struct nvgpu_timeout *timeout,
136 * If a timeout occurs and %NVGPU_TIMER_SILENT_TIMEOUT is not set in the timeout 136 * If a timeout occurs and %NVGPU_TIMER_SILENT_TIMEOUT is not set in the timeout
137 * then a message is printed based on %fmt. 137 * then a message is printed based on %fmt.
138 */ 138 */
139int __nvgpu_timeout_check_msg(struct nvgpu_timeout *timeout, 139int __nvgpu_timeout_expired_msg(struct nvgpu_timeout *timeout,
140 void *caller, const char *fmt, ...) 140 void *caller, const char *fmt, ...)
141{ 141{
142 int ret; 142 int ret;
@@ -144,10 +144,10 @@ int __nvgpu_timeout_check_msg(struct nvgpu_timeout *timeout,
144 144
145 va_start(args, fmt); 145 va_start(args, fmt);
146 if (timeout->flags & NVGPU_TIMER_RETRY_TIMER) 146 if (timeout->flags & NVGPU_TIMER_RETRY_TIMER)
147 ret = __nvgpu_timeout_check_msg_retry(timeout, caller, fmt, 147 ret = __nvgpu_timeout_expired_msg_retry(timeout, caller, fmt,
148 args); 148 args);
149 else 149 else
150 ret = __nvgpu_timeout_check_msg_cpu(timeout, caller, fmt, 150 ret = __nvgpu_timeout_expired_msg_cpu(timeout, caller, fmt,
151 args); 151 args);
152 va_end(args); 152 va_end(args);
153 153
@@ -155,7 +155,7 @@ int __nvgpu_timeout_check_msg(struct nvgpu_timeout *timeout,
155} 155}
156 156
157/** 157/**
158 * nvgpu_timeout_peek - Check the status of a timeout. 158 * nvgpu_timeout_peek_expired - Check the status of a timeout.
159 * 159 *
160 * @timeout - The timeout to check. 160 * @timeout - The timeout to check.
161 * 161 *
@@ -165,7 +165,7 @@ int __nvgpu_timeout_check_msg(struct nvgpu_timeout *timeout,
165 * 165 *
166 * This function honors the pre-Si check as well. 166 * This function honors the pre-Si check as well.
167 */ 167 */
168int nvgpu_timeout_peek(struct nvgpu_timeout *timeout) 168int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout)
169{ 169{
170 if (nvgpu_timeout_is_pre_silicon(timeout)) 170 if (nvgpu_timeout_is_pre_silicon(timeout))
171 return 0; 171 return 0;