mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Adjust documentation and validity checks in the fence functions for simplicity. Now that the cde code is using user fences cleanly, the do-nothing-on-null action can cause unintended behaviour in new code using nvgpu_fence_get and nvgpu_fence_put. It does not make sense to call these with a null fence, so delete the checks. Extend the documentation in nvgpu_fence_extract_user() for the os fence lifetime to give a reason for the dup call. Make nvgpu_fence_from_semaphore() and nvgpu_fence_from_syncpt() return void. These fill a previously allocated object; the only failure would have been a null object, but that never happens and is not acceptable behaviour for callers so delete these null checks and fix types. Jira NVGPU-5248 Change-Id: I9f82365d50ab5600374c8f7dd513691eac14a2f1 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2359624 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>