mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
tegra: nvmap: Clean-up OOT NvMap
Remove macro-protected dead code. NVMAP_LOADABLE_MODULE enables NvMap as an OOT module, while NVMAP_UPSTREAM_KERNEL is a config for kstable/OOT kernel. For Kernel 5.10+ both are always defined, So the related macro protected code can be safely removed. Bug 4479135 Change-Id: I792f1cb2c54fd21bcf0e73ffc52e46e4efd47862 Signed-off-by: Yash Bhatt <ybhatt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079420 Reviewed-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7393789444
commit
25bc2a3b96
@@ -548,9 +548,6 @@ err_nomem:
|
||||
int __nvmap_dmabuf_fd(struct nvmap_client *client,
|
||||
struct dma_buf *dmabuf, int flags)
|
||||
{
|
||||
#if !defined(NVMAP_CONFIG_HANDLE_AS_ID) && !defined(NVMAP_LOADABLE_MODULE)
|
||||
int start_fd = NVMAP_CONFIG_FD_START;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
#ifdef NVMAP_CONFIG_DEFER_FD_RECYCLE
|
||||
@@ -566,11 +563,7 @@ int __nvmap_dmabuf_fd(struct nvmap_client *client,
|
||||
* __FD_SETSIZE limitation issue for select(),
|
||||
* pselect() syscalls.
|
||||
*/
|
||||
#if defined(NVMAP_LOADABLE_MODULE) || defined(NVMAP_CONFIG_HANDLE_AS_ID)
|
||||
ret = get_unused_fd_flags(flags);
|
||||
#else
|
||||
ret = __alloc_fd(current->files, start_fd, sysctl_nr_open, flags);
|
||||
#endif
|
||||
if (ret == -EMFILE)
|
||||
pr_err_ratelimited("NvMap: FD limit is crossed for uid %d\n",
|
||||
from_kuid(current_user_ns(), current_uid()));
|
||||
|
||||
Reference in New Issue
Block a user