diff options
author | Philip Elcan <pelcan@nvidia.com> | 2018-08-27 12:45:27 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-10 18:23:45 -0400 |
commit | d2be65315a9ebfc88e77489571a31c48b3d21284 (patch) | |
tree | ff4a2d2d90ad1b6f3768bcb8e67176202ccfe97c /drivers/gpu/nvgpu/include/nvgpu/types.h | |
parent | c86f185d1022de18a1a1073aa91d2b06aa59e2fc (diff) |
gpu: nvgpu: fix some MISRA 10.3 violations
Fix MISRA 10.3 violations in mclk_gp106.c. Cleanup cases where values
were being assigned to narrower types.
Changes in mclk_gp106.c required updates to other files to resolve
errors and prevent introducing new violations.
JIRA NVGPU-647
Change-Id: Ifdb03ad41d9dbf05dbcf79494ae8565fff6ee083
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809366
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/types.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/types.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/types.h b/drivers/gpu/nvgpu/include/nvgpu/types.h index 8320721b..d4d88d4d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/types.h +++ b/drivers/gpu/nvgpu/include/nvgpu/types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -60,4 +60,11 @@ | |||
60 | #define U32(x) ((u32)(x)) | 60 | #define U32(x) ((u32)(x)) |
61 | #define U64(x) ((u64)(x)) | 61 | #define U64(x) ((u64)(x)) |
62 | 62 | ||
63 | /* Linux uses U8_MAX instead of UCHAR_MAX. We define it here for non-Linux | ||
64 | * OSes | ||
65 | */ | ||
66 | #if !defined(__KERNEL__) && !defined(U8_MAX) | ||
67 | #define U8_MAX ((u8)255) | ||
68 | #endif | ||
69 | |||
63 | #endif | 70 | #endif |