mm: replace vma->vm_flags direct modifications with modifier calls
[linux-block.git] / drivers / misc / habanalabs / gaudi2 / gaudi2.c
index e793fb2bdcbe6c9d55765420c3e9dfca3e6ed225..65502ec02bc0458fe17ad07773f6d828bcc0dc36 100644 (file)
@@ -5538,8 +5538,8 @@ static int gaudi2_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
 {
        int rc;
 
-       vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
-                       VM_DONTCOPY | VM_NORESERVE;
+       vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
+                       VM_DONTCOPY | VM_NORESERVE);
 
 #ifdef _HAS_DMA_MMAP_COHERENT
 
@@ -10116,8 +10116,8 @@ static int gaudi2_block_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
 
        address = pci_resource_start(hdev->pdev, SRAM_CFG_BAR_ID) + offset_in_bar;
 
-       vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
-                       VM_DONTCOPY | VM_NORESERVE;
+       vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP |
+                       VM_DONTCOPY | VM_NORESERVE);
 
        rc = remap_pfn_range(vma, vma->vm_start, address >> PAGE_SHIFT,
                        block_size, vma->vm_page_prot);