mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
The BIOS_GET_FIELD() macro does a simple bit mask and shift operation. The value of this macro is assigned to variables of different data types. Casting the macro to different data types causes MISRA rule 10.8 violations. This issue is resolved by doing the cast inside the macro and returning the value in the correct data type. These changes also clear MISRA rule 10.1, 10.3 and 10.4 violations. JIRA NVGPU-992 JIRA NVGPU-1006 JIRA NVGPU-1010 Change-Id: I16345865d107f0ff0b34daa8b17d7d576eafcfbf Signed-off-by: Sai Nikhil <snikhil@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1936357 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
12 KiB
12 KiB