diff options
Diffstat (limited to 'drivers/gpu/nvgpu/therm')
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmchannel.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmdev.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmpmu.c | 5 |
3 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.c b/drivers/gpu/nvgpu/therm/thrmchannel.c index 7d196422..8130656c 100644 --- a/drivers/gpu/nvgpu/therm/thrmchannel.c +++ b/drivers/gpu/nvgpu/therm/thrmchannel.c | |||
@@ -73,8 +73,9 @@ static struct boardobj *construct_channel_device(struct gk20a *g, | |||
73 | 73 | ||
74 | status = boardobj_construct_super(g, &board_obj_ptr, | 74 | status = boardobj_construct_super(g, &board_obj_ptr, |
75 | pargs_size, pargs); | 75 | pargs_size, pargs); |
76 | if (status) | 76 | if (status) { |
77 | return NULL; | 77 | return NULL; |
78 | } | ||
78 | 79 | ||
79 | /* Set Super class interfaces */ | 80 | /* Set Super class interfaces */ |
80 | board_obj_ptr->pmudatainit = _therm_channel_pmudatainit_device; | 81 | board_obj_ptr->pmudatainit = _therm_channel_pmudatainit_device; |
@@ -108,8 +109,9 @@ static int _therm_channel_pmudata_instget(struct gk20a *g, | |||
108 | 109 | ||
109 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 110 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
110 | if (((u32)BIT(idx) & | 111 | if (((u32)BIT(idx) & |
111 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) | 112 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { |
112 | return -EINVAL; | 113 | return -EINVAL; |
114 | } | ||
113 | 115 | ||
114 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) | 116 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) |
115 | &pgrp_set->objects[idx].data.board_obj; | 117 | &pgrp_set->objects[idx].data.board_obj; |
@@ -233,8 +235,9 @@ int therm_channel_sw_setup(struct gk20a *g) | |||
233 | pboardobjgrp->pmudatainstget = _therm_channel_pmudata_instget; | 235 | pboardobjgrp->pmudatainstget = _therm_channel_pmudata_instget; |
234 | 236 | ||
235 | status = devinit_get_therm_channel_table(g, pthermchannelobjs); | 237 | status = devinit_get_therm_channel_table(g, pthermchannelobjs); |
236 | if (status) | 238 | if (status) { |
237 | goto done; | 239 | goto done; |
240 | } | ||
238 | 241 | ||
239 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_CHANNEL); | 242 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_CHANNEL); |
240 | 243 | ||
diff --git a/drivers/gpu/nvgpu/therm/thrmdev.c b/drivers/gpu/nvgpu/therm/thrmdev.c index ddd1f280..b0e65af7 100644 --- a/drivers/gpu/nvgpu/therm/thrmdev.c +++ b/drivers/gpu/nvgpu/therm/thrmdev.c | |||
@@ -43,8 +43,9 @@ static int _therm_device_pmudata_instget(struct gk20a *g, | |||
43 | 43 | ||
44 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 44 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
45 | if (((u32)BIT(idx) & | 45 | if (((u32)BIT(idx) & |
46 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) | 46 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { |
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | } | ||
48 | 49 | ||
49 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) | 50 | *ppboardobjpmudata = (struct nv_pmu_boardobj *) |
50 | &pgrp_set->objects[idx].data; | 51 | &pgrp_set->objects[idx].data; |
@@ -208,8 +209,9 @@ static struct boardobj *therm_device_construct(struct gk20a *g, | |||
208 | board_obj_ptr = NULL; | 209 | board_obj_ptr = NULL; |
209 | nvgpu_err(g, | 210 | nvgpu_err(g, |
210 | "could not allocate memory for therm_device"); | 211 | "could not allocate memory for therm_device"); |
211 | if (board_obj_ptr != NULL) | 212 | if (board_obj_ptr != NULL) { |
212 | nvgpu_kfree(g, board_obj_ptr); | 213 | nvgpu_kfree(g, board_obj_ptr); |
214 | } | ||
213 | } | 215 | } |
214 | 216 | ||
215 | 217 | ||
@@ -347,8 +349,9 @@ int therm_device_sw_setup(struct gk20a *g) | |||
347 | pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget; | 349 | pboardobjgrp->pmudatainstget = _therm_device_pmudata_instget; |
348 | 350 | ||
349 | status = devinit_get_therm_device_table(g, pthermdeviceobjs); | 351 | status = devinit_get_therm_device_table(g, pthermdeviceobjs); |
350 | if (status) | 352 | if (status) { |
351 | goto done; | 353 | goto done; |
354 | } | ||
352 | 355 | ||
353 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE); | 356 | BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, THERM, THERM_DEVICE); |
354 | 357 | ||
diff --git a/drivers/gpu/nvgpu/therm/thrmpmu.c b/drivers/gpu/nvgpu/therm/thrmpmu.c index 7814cf5e..e23d1d63 100644 --- a/drivers/gpu/nvgpu/therm/thrmpmu.c +++ b/drivers/gpu/nvgpu/therm/thrmpmu.c | |||
@@ -43,11 +43,12 @@ static void therm_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg, | |||
43 | return; | 43 | return; |
44 | } | 44 | } |
45 | 45 | ||
46 | if (!phandlerparams->prpccall->b_supported) | 46 | if (!phandlerparams->prpccall->b_supported) { |
47 | nvgpu_err(g, "RPC msg %x failed", | 47 | nvgpu_err(g, "RPC msg %x failed", |
48 | msg->msg.pmgr.msg_type); | 48 | msg->msg.pmgr.msg_type); |
49 | else | 49 | } else { |
50 | phandlerparams->success = 1; | 50 | phandlerparams->success = 1; |
51 | } | ||
51 | } | 52 | } |
52 | 53 | ||
53 | int therm_send_pmgr_tables_to_pmu(struct gk20a *g) | 54 | int therm_send_pmgr_tables_to_pmu(struct gk20a *g) |