mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
This change fixes below follow-up issues with the earlier fix to access_ok() API done as part of https://git-master.nvidia.com/r/c/linux-nvidia/+/2361042: 1. Definition of VERIFY_READ and VERIFY_WRITE have been removed after K4.14. Hence, used them only for kernel versions < K5.4. 2. Changed access_type parameter of tegra_cec_access_ok() API to bool. WRITE or READ will be chosen based on the bool value. 3. In the last CL, VERIFY_WRITE was changed to VERIFY_READ in two access_ok() calls by mistake. Corrected them in this CL. 4. Defined access_type variable with attribute __maybe_unused since gcc doesn't seem to consider a variable as used if only passed as function parameter. bug 200601926 Change-Id: I9f3540cd028280ca679b4b69d5b4a72aa943b2ae Signed-off-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2394585 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Shu Zhong <shuz@nvidia.com> Reviewed-by: Ujwal Patel <ujwalp@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit