mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
MISRA Rule 11.3 prohibits casting between different pointer types. The previous "fix" in nvgpu_bios_parse_rom() was to use an intermediate cast to uintptr_t. However, that leaves the possibility of creating a mis-aligned pointer. So, instead of casts, use nvgpu_memcpy() to make a copy of the data in a local structure. JIRA NVGPU-3317 Change-Id: I3f9dd0d6c10a7425f300b51410be2e248177b505 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2122390 Reviewed-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>