From 50b2c45aa56cfc572b3cfa5fc92ece57a443fcde Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 11 Oct 2017 02:31:51 -0700 Subject: gpu: nvgpu: protect stack_trace with config We use struct stack_trace in struct channel_gk20a_ref_action But since channel_gk20a_ref_action is needed only if GK20A_CHANNEL_REFCOUNT_TRACKING is set, protect it with that config Jira NVGPU-259 Change-Id: I6b2d6f470bf924bb1ddfd31ba9968b56c63c2372 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1576929 Reviewed-by: Alex Waterman Reviewed-by: Konsta Holtta Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index e4cce101..9c0d22d2 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -161,6 +161,7 @@ enum channel_gk20a_ref_action_type { channel_gk20a_ref_action_put }; +#if GK20A_CHANNEL_REFCOUNT_TRACKING struct channel_gk20a_ref_action { enum channel_gk20a_ref_action_type type; s64 timestamp_ms; @@ -171,6 +172,7 @@ struct channel_gk20a_ref_action { struct stack_trace trace; unsigned long trace_entries[GK20A_CHANNEL_REFCOUNT_TRACKING_STACKLEN]; }; +#endif /* this is the priv element of struct nvhost_channel */ struct channel_gk20a { -- cgit v1.2.2