summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/debug_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-09-26 09:05:41 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:34 -0400
commit2d0bcfa3318c276dba5100510e59c5c2fa62957f (patch)
tree8651c32920cddc94cf046c76e7ea6676d6e688e8 /drivers/gpu/nvgpu/gk20a/debug_gk20a.c
parent79ab01debd382b91aecb474fc3cb51de78e2f1a7 (diff)
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 <kholtta@nvidia.com> Reviewed-on: http://git-master/r/542552 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/debug_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/debug_gk20a.c9
1 files changed, 7 insertions, 2 deletions
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,
166 struct gk20a *g = platform->g; 166 struct gk20a *g = platform->g;
167 struct fifo_gk20a *f = &g->fifo; 167 struct fifo_gk20a *f = &g->fifo;
168 u32 chid; 168 u32 chid;
169 int i; 169 int i, err;
170
171 err = gk20a_busy(g->dev);
172 if (err) {
173 gk20a_debug_output(o, "failed to power on gpu: %d\n", err);
174 return;
175 }
170 176
171 gk20a_busy(g->dev);
172 for (i = 0; i < fifo_pbdma_status__size_1_v(); i++) { 177 for (i = 0; i < fifo_pbdma_status__size_1_v(); i++) {
173 u32 status = gk20a_readl(g, fifo_pbdma_status_r(i)); 178 u32 status = gk20a_readl(g, fifo_pbdma_status_r(i));
174 u32 chan_status = fifo_pbdma_status_chan_status_v(status); 179 u32 chan_status = fifo_pbdma_status_chan_status_v(status);