diff options
| author | Ilia Levi <ilia.levi@intel.com> | 2024-08-19 12:13:07 +0300 |
|---|---|---|
| committer | Koby Elbaz <koby.elbaz@intel.com> | 2025-09-25 09:09:29 +0300 |
| commit | 0668db41b5d8a834a04be3b281fa9452dcf3dc18 (patch) | |
| tree | 1fbcb08e7c5bf03c736f8a558e6f1bc7c504acbc | |
| parent | 0529b191ac9c907225593e12a68f1718a60b2fba (diff) | |
accel/habanalabs: remove old interface variation of 'access_ok()'
The access_ok() API no longer requires the VERIFY_WRITE argument,
and the use of the old interface with VERIFY_WRITE is deprecated.
Clean up the habanalabs memory manager to use the modern access_ok()
interface consistently. This removes old #ifdef guards and aligns the
driver with current upstream kernel APIs.
Signed-off-by: Ilia Levi <ilia.levi@intel.com>
Reviewed-by: Koby Elbaz <koby.elbaz@intel.com>
Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>
| -rw-r--r-- | drivers/accel/habanalabs/common/memory_mgr.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/accel/habanalabs/common/memory_mgr.c b/drivers/accel/habanalabs/common/memory_mgr.c index 99cd83139d46..4401beb99e42 100644 --- a/drivers/accel/habanalabs/common/memory_mgr.c +++ b/drivers/accel/habanalabs/common/memory_mgr.c @@ -259,13 +259,8 @@ int hl_mem_mgr_mmap(struct hl_mem_mgr *mmg, struct vm_area_struct *vma, goto put_mem; } -#ifdef _HAS_TYPE_ARG_IN_ACCESS_OK - if (!access_ok(VERIFY_WRITE, (void __user *)(uintptr_t)vma->vm_start, - user_mem_size)) { -#else if (!access_ok((void __user *)(uintptr_t)vma->vm_start, user_mem_size)) { -#endif dev_err(mmg->dev, "%s: User pointer is invalid - 0x%lx\n", buf->behavior->topic, vma->vm_start); |
