summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-09-07 15:06:58 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-09-14 15:10:28 -0400
commit519df8a6f21d4f7a86f137dd65f75ebf66663f7d (patch)
tree20b204c26aac2eac934dfe98d5384d5703313df6 /drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
parente7b54945f5eb3394ec630e350b5faa686c6a0eb6 (diff)
drm/amd/powerplay: calculate flexible array member's address.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc/pp_debug.h')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/pp_debug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
index d7d83b7c7f95..bfdbec10cdd5 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
@@ -43,5 +43,8 @@
} while (0)
+#define GET_FLEXIBLE_ARRAY_MEMBER_ADDR(type, member, ptr, n) \
+ (type *)((char *)&(ptr)->member + (sizeof(type) * (n)))
+
#endif /* PP_DEBUG_H */