From 54eb74539342ce0fa6961e46f2ce22b68ad2fb21 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 12:56:41 -0700 Subject: 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 Reviewed-on: http://git-master/r/1457353 Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/pmgr/pwrmonitor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/pmgr/pwrmonitor.c') 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) BOARDOBJGRP_FOR_EACH_INDEX_IN_MASK(32, indx, objmask) { pchannel = PMGR_PWR_MONITOR_GET_PWR_CHANNEL(g, indx); if (pchannel == NULL) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "PMGR_PWR_MONITOR_GET_PWR_CHANNEL-failed %d", indx); return -EINVAL; } @@ -107,7 +107,7 @@ static u32 _pwr_domains_pmudatainit_sensor(struct gk20a *g, status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); if (status) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "error updating pmu boardobjgrp for pwr sensor 0x%x", status); goto done; @@ -263,7 +263,7 @@ static u32 devinit_get_pwr_topology_table(struct gk20a *g, pwr_topology_size, pwr_topology_data.boardobj.type); if (!boardobj) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "unable to create pwr topology for %d type %d", index, pwr_topology_data.boardobj.type); status = -EINVAL; @@ -274,7 +274,7 @@ static u32 devinit_get_pwr_topology_table(struct gk20a *g, boardobj, obj_index); if (status) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "unable to insert pwr topology boardobj for %d", index); status = -EINVAL; goto done; @@ -300,7 +300,7 @@ u32 pmgr_monitor_sw_setup(struct gk20a *g) status = boardobjgrpconstruct_e32( &g->pmgr_pmu.pmgr_monitorobjs.pwr_channels); if (status) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "error creating boardobjgrp for pmgr channel, status - 0x%x", status); goto done; @@ -315,7 +315,7 @@ u32 pmgr_monitor_sw_setup(struct gk20a *g) status = boardobjgrpconstruct_e32( &g->pmgr_pmu.pmgr_monitorobjs.pwr_ch_rels); if (status) { - gk20a_err(dev_from_gk20a(g), + nvgpu_err(g, "error creating boardobjgrp for pmgr channel relationship, status - 0x%x", status); goto done; -- cgit v1.2.2