diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-06 15:47:54 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 22:04:20 -0400 |
commit | a9c4c5d88db75d5ba2327fe16d3be1654518ccaf (patch) | |
tree | 33deafe68e266e23559103146c755f11469c0f5b /drivers/gpu/nvgpu/volt/volt_policy.c | |
parent | 57d624f900896a257e2e918e93e99a14f734aea5 (diff) |
gpu: nvgpu: volt: Use new error macros
gk20a_err() and gk20a_warn() require a struct device pointer,
which is not portable across operating systems. The new nvgpu_err()
and nvgpu_warn() macros take struct gk20a pointer. Convert code
to use the more portable macros.
JIRA NVGPU-16
Change-Id: Iea4a2f81d3aa2ff409fbb4bf9db441401f3a41e5
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1457352
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/volt/volt_policy.c')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_policy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_policy.c b/drivers/gpu/nvgpu/volt/volt_policy.c index 239b908e..d9d4d9da 100644 --- a/drivers/gpu/nvgpu/volt/volt_policy.c +++ b/drivers/gpu/nvgpu/volt/volt_policy.c | |||
@@ -127,7 +127,7 @@ struct voltage_policy *volt_volt_policy_construct(struct gk20a *g, void *pargs) | |||
127 | sizeof(struct voltage_policy_split_rail_single_step), | 127 | sizeof(struct voltage_policy_split_rail_single_step), |
128 | pargs); | 128 | pargs); |
129 | if (status) { | 129 | if (status) { |
130 | gk20a_err(dev_from_gk20a(g), | 130 | nvgpu_err(g, |
131 | "Could not allocate memory for voltage_policy"); | 131 | "Could not allocate memory for voltage_policy"); |
132 | pboard_obj = NULL; | 132 | pboard_obj = NULL; |
133 | } | 133 | } |
@@ -219,7 +219,7 @@ static u32 volt_get_volt_policy_table(struct gk20a *g, | |||
219 | ppolicy = volt_volt_policy_construct(g, | 219 | ppolicy = volt_volt_policy_construct(g, |
220 | (void *)&policy_type_data); | 220 | (void *)&policy_type_data); |
221 | if (ppolicy == NULL) { | 221 | if (ppolicy == NULL) { |
222 | gk20a_err(dev_from_gk20a(g), | 222 | nvgpu_err(g, |
223 | "Failure to construct VOLT_POLICY object."); | 223 | "Failure to construct VOLT_POLICY object."); |
224 | status = -EINVAL; | 224 | status = -EINVAL; |
225 | goto done; | 225 | goto done; |
@@ -229,7 +229,7 @@ static u32 volt_get_volt_policy_table(struct gk20a *g, | |||
229 | &pvolt_policy_metadata->volt_policies.super, | 229 | &pvolt_policy_metadata->volt_policies.super, |
230 | (struct boardobj *)ppolicy, i); | 230 | (struct boardobj *)ppolicy, i); |
231 | if (status) { | 231 | if (status) { |
232 | gk20a_err(dev_from_gk20a(g), | 232 | nvgpu_err(g, |
233 | "could not add volt_policy for entry %d into boardobjgrp ", | 233 | "could not add volt_policy for entry %d into boardobjgrp ", |
234 | i); | 234 | i); |
235 | goto done; | 235 | goto done; |
@@ -307,7 +307,7 @@ u32 volt_policy_sw_setup(struct gk20a *g) | |||
307 | status = boardobjgrpconstruct_e32( | 307 | status = boardobjgrpconstruct_e32( |
308 | &g->perf_pmu.volt.volt_policy_metadata.volt_policies); | 308 | &g->perf_pmu.volt.volt_policy_metadata.volt_policies); |
309 | if (status) { | 309 | if (status) { |
310 | gk20a_err(dev_from_gk20a(g), | 310 | nvgpu_err(g, |
311 | "error creating boardobjgrp for volt rail, status - 0x%x", | 311 | "error creating boardobjgrp for volt rail, status - 0x%x", |
312 | status); | 312 | status); |
313 | goto done; | 313 | goto done; |
@@ -331,7 +331,7 @@ u32 volt_policy_sw_setup(struct gk20a *g) | |||
331 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 331 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
332 | volt, VOLT, volt_policy, VOLT_POLICY); | 332 | volt, VOLT, volt_policy, VOLT_POLICY); |
333 | if (status) { | 333 | if (status) { |
334 | gk20a_err(dev_from_gk20a(g), | 334 | nvgpu_err(g, |
335 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 335 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
336 | status); | 336 | status); |
337 | goto done; | 337 | goto done; |
@@ -341,7 +341,7 @@ u32 volt_policy_sw_setup(struct gk20a *g) | |||
341 | &g->perf_pmu.volt.volt_policy_metadata.volt_policies.super, | 341 | &g->perf_pmu.volt.volt_policy_metadata.volt_policies.super, |
342 | volt, VOLT, volt_policy, VOLT_POLICY); | 342 | volt, VOLT, volt_policy, VOLT_POLICY); |
343 | if (status) { | 343 | if (status) { |
344 | gk20a_err(dev_from_gk20a(g), | 344 | nvgpu_err(g, |
345 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 345 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
346 | status); | 346 | status); |
347 | goto done; | 347 | goto done; |