summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pwrmonitor.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 15:56:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-10 15:24:22 -0400
commit54eb74539342ce0fa6961e46f2ce22b68ad2fb21 (patch)
tree0de41f6b86a1b44f91db1361fcb68acec4056d99 /drivers/gpu/nvgpu/pmgr/pwrmonitor.c
parentbc4a0bd0acd1d9b09f753d97383caa542cbb728a (diff)
gpu: nvgpu: pmgr: 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: I8d85e4d3da1fe8f99649ef4395a5b0dc52b0caf2 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457353 Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pwrmonitor.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pwrmonitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrmonitor.c b/drivers/gpu/nvgpu/pmgr/pwrmonitor.c
index 685aa71a..05636001 100644
--- a/drivers/gpu/nvgpu/pmgr/pwrmonitor.c
+++ b/drivers/gpu/nvgpu/pmgr/pwrmonitor.c
@@ -80,7 +80,7 @@ static u32 _pwr_channel_state_init(struct gk20a *g)
80 BOARDOBJGRP_FOR_EACH_INDEX_IN_MASK(32, indx, objmask) { 80 BOARDOBJGRP_FOR_EACH_INDEX_IN_MASK(32, indx, objmask) {
81 pchannel = PMGR_PWR_MONITOR_GET_PWR_CHANNEL(g, indx); 81 pchannel = PMGR_PWR_MONITOR_GET_PWR_CHANNEL(g, indx);
82 if (pchannel == NULL) { 82 if (pchannel == NULL) {
83 gk20a_err(dev_from_gk20a(g), 83 nvgpu_err(g,
84 "PMGR_PWR_MONITOR_GET_PWR_CHANNEL-failed %d", indx); 84 "PMGR_PWR_MONITOR_GET_PWR_CHANNEL-failed %d", indx);
85 return -EINVAL; 85 return -EINVAL;
86 } 86 }
@@ -107,7 +107,7 @@ static u32 _pwr_domains_pmudatainit_sensor(struct gk20a *g,
107 107
108 status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); 108 status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata);
109 if (status) { 109 if (status) {
110 gk20a_err(dev_from_gk20a(g), 110 nvgpu_err(g,
111 "error updating pmu boardobjgrp for pwr sensor 0x%x", 111 "error updating pmu boardobjgrp for pwr sensor 0x%x",
112 status); 112 status);
113 goto done; 113 goto done;
@@ -263,7 +263,7 @@ static u32 devinit_get_pwr_topology_table(struct gk20a *g,
263 pwr_topology_size, pwr_topology_data.boardobj.type); 263 pwr_topology_size, pwr_topology_data.boardobj.type);
264 264
265 if (!boardobj) { 265 if (!boardobj) {
266 gk20a_err(dev_from_gk20a(g), 266 nvgpu_err(g,
267 "unable to create pwr topology for %d type %d", 267 "unable to create pwr topology for %d type %d",
268 index, pwr_topology_data.boardobj.type); 268 index, pwr_topology_data.boardobj.type);
269 status = -EINVAL; 269 status = -EINVAL;
@@ -274,7 +274,7 @@ static u32 devinit_get_pwr_topology_table(struct gk20a *g,
274 boardobj, obj_index); 274 boardobj, obj_index);
275 275
276 if (status) { 276 if (status) {
277 gk20a_err(dev_from_gk20a(g), 277 nvgpu_err(g,
278 "unable to insert pwr topology boardobj for %d", index); 278 "unable to insert pwr topology boardobj for %d", index);
279 status = -EINVAL; 279 status = -EINVAL;
280 goto done; 280 goto done;
@@ -300,7 +300,7 @@ u32 pmgr_monitor_sw_setup(struct gk20a *g)
300 status = boardobjgrpconstruct_e32( 300 status = boardobjgrpconstruct_e32(
301 &g->pmgr_pmu.pmgr_monitorobjs.pwr_channels); 301 &g->pmgr_pmu.pmgr_monitorobjs.pwr_channels);
302 if (status) { 302 if (status) {
303 gk20a_err(dev_from_gk20a(g), 303 nvgpu_err(g,
304 "error creating boardobjgrp for pmgr channel, status - 0x%x", 304 "error creating boardobjgrp for pmgr channel, status - 0x%x",
305 status); 305 status);
306 goto done; 306 goto done;
@@ -315,7 +315,7 @@ u32 pmgr_monitor_sw_setup(struct gk20a *g)
315 status = boardobjgrpconstruct_e32( 315 status = boardobjgrpconstruct_e32(
316 &g->pmgr_pmu.pmgr_monitorobjs.pwr_ch_rels); 316 &g->pmgr_pmu.pmgr_monitorobjs.pwr_ch_rels);
317 if (status) { 317 if (status) {
318 gk20a_err(dev_from_gk20a(g), 318 nvgpu_err(g,
319 "error creating boardobjgrp for pmgr channel relationship, status - 0x%x", 319 "error creating boardobjgrp for pmgr channel relationship, status - 0x%x",
320 status); 320 status);
321 goto done; 321 goto done;