summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/bitops.h2
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/types.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/bitops.h b/drivers/gpu/nvgpu/include/nvgpu/bitops.h
index 8760708e..b6666930 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/bitops.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/bitops.h
@@ -27,6 +27,8 @@
27/* 27/*
28 * Explicit sizes for bit definitions. Please use these instead of BIT(). 28 * Explicit sizes for bit definitions. Please use these instead of BIT().
29 */ 29 */
30#define BIT8(i) (U8(1) << (i))
31#define BIT16(i) (U16(1) << (i))
30#define BIT32(i) (U32(1) << (i)) 32#define BIT32(i) (U32(1) << (i))
31#define BIT64(i) (U64(1) << (i)) 33#define BIT64(i) (U64(1) << (i))
32 34
diff --git a/drivers/gpu/nvgpu/include/nvgpu/types.h b/drivers/gpu/nvgpu/include/nvgpu/types.h
index dfa95557..8320721b 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/types.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/types.h
@@ -55,6 +55,8 @@
55 * overflows the 32 bit data type. So in this case we need an explicit cast to 55 * overflows the 32 bit data type. So in this case we need an explicit cast to
56 * 64 bits in order to prevent undefined behavior. 56 * 64 bits in order to prevent undefined behavior.
57 */ 57 */
58#define U8(x) ((u8)(x))
59#define U16(x) ((u16)(x))
58#define U32(x) ((u32)(x)) 60#define U32(x) ((u32)(x))
59#define U64(x) ((u64)(x)) 61#define U64(x) ((u64)(x))
60 62