Files
linux-nvgpu/drivers/gpu/nvgpu/common/vbios
Philip Elcan 4071b35235 gpu: nvgpu: bios: use memcpy to fix MISRA 11.3 bugs
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>
2019-05-22 13:36:07 -07:00
..
2019-04-30 02:47:37 -07:00