From 6bf323f3894bdcb95461cdf0f834cbef06e9e5d6 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 11 Oct 2017 03:53:29 -0700 Subject: gpu: nvgpu: remove use of multichar constants In gk20a.h, we use these multichar constants 'DONE', '0R32', '0W32' But these constants fail compilation on some cross-os compilers Hence remove them by creating a specific MULTICHAR_TAG() All the User space components also form these constants in similar fashion Jira NVGPU-259 Change-Id: Ibe83617a8d15b657e450fdd59dbc171b3d822842 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1576933 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index bf10055a..cf13999a 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1295,11 +1295,12 @@ static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) g->gr_idle_timeout_default : ULONG_MAX; } +#define MULTICHAR_TAG(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) enum BAR0_DEBUG_OPERATION { BARO_ZERO_NOP = 0, - OP_END = 'DONE', - BAR0_READ32 = '0R32', - BAR0_WRITE32 = '0W32', + OP_END = MULTICHAR_TAG('D', 'O', 'N', 'E'), + BAR0_READ32 = MULTICHAR_TAG('0', 'R', '3', '2'), + BAR0_WRITE32 = MULTICHAR_TAG('0', 'W', '3', '2'), }; struct share_buffer_head { -- cgit v1.2.2