Files
linux-nvgpu/drivers/gpu
tkudav cb8003d9e0 gpu: nvgpu: Modify common.top for better coverage
Following changes are done to common.top code and UT:

1.Change return type for device_info_parse_enum to void as it can never
return non-zero value.
   - This is a private HAL and is only called by get_device_info HAL.
   - It gets called only for table entry with entry type = enum.
   - So there is no error path left.
This helps remove unnecessary branches and get better branch coverage

2. Check if the data parsing function pointers are not NULL before
parsing the device tree. Return error if there are no functions
to interpret the device_info table registers. Add checks for same in
unit test test_get_device_info().

JIRA NVGPU-2204

Change-Id: I8833da7aa58b070d19b50ee17f64362f301bd792
Signed-off-by: tkudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2269603
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
..
2017-10-29 11:00:55 -07:00