From 2d0bcfa3318c276dba5100510e59c5c2fa62957f Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Fri, 26 Sep 2014 16:05:41 +0300 Subject: gpu: nvgpu: add __must_check to gk20a_busy The return value of gk20a_busy must be checked since it may not succeed in some cases. Add the __must_check attribute that generates a compiler warning for code that does not read the return value and fix all uses of the function to take error cases into account. Bug 200040921 Change-Id: Ibc2b119985fa230324c88026fe94fc5f1894fe4f Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/542552 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/debug_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index f41d883f..2cc3d38d 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c @@ -166,9 +166,14 @@ void gk20a_debug_show_dump(struct platform_device *pdev, struct gk20a *g = platform->g; struct fifo_gk20a *f = &g->fifo; u32 chid; - int i; + int i, err; + + err = gk20a_busy(g->dev); + if (err) { + gk20a_debug_output(o, "failed to power on gpu: %d\n", err); + return; + } - gk20a_busy(g->dev); for (i = 0; i < fifo_pbdma_status__size_1_v(); i++) { u32 status = gk20a_readl(g, fifo_pbdma_status_r(i)); u32 chan_status = fifo_pbdma_status_chan_status_v(status); -- cgit v1.2.2