You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6f5071020d
commit
f0f37e2f77
@@ -69,11 +69,11 @@ ia32_install_gate_page (struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
}
|
||||
|
||||
|
||||
static struct vm_operations_struct ia32_shared_page_vm_ops = {
|
||||
static const struct vm_operations_struct ia32_shared_page_vm_ops = {
|
||||
.fault = ia32_install_shared_page
|
||||
};
|
||||
|
||||
static struct vm_operations_struct ia32_gate_page_vm_ops = {
|
||||
static const struct vm_operations_struct ia32_gate_page_vm_ops = {
|
||||
.fault = ia32_install_gate_page
|
||||
};
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ static int spufs_mem_mmap_access(struct vm_area_struct *vma,
|
||||
return len;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_mem_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_mem_mmap_vmops = {
|
||||
.fault = spufs_mem_mmap_fault,
|
||||
.access = spufs_mem_mmap_access,
|
||||
};
|
||||
@@ -436,7 +436,7 @@ static int spufs_cntl_mmap_fault(struct vm_area_struct *vma,
|
||||
return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_cntl_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_cntl_mmap_vmops = {
|
||||
.fault = spufs_cntl_mmap_fault,
|
||||
};
|
||||
|
||||
@@ -1143,7 +1143,7 @@ spufs_signal1_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_signal1_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_signal1_mmap_vmops = {
|
||||
.fault = spufs_signal1_mmap_fault,
|
||||
};
|
||||
|
||||
@@ -1279,7 +1279,7 @@ spufs_signal2_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_signal2_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_signal2_mmap_vmops = {
|
||||
.fault = spufs_signal2_mmap_fault,
|
||||
};
|
||||
|
||||
@@ -1397,7 +1397,7 @@ spufs_mss_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_mss_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_mss_mmap_vmops = {
|
||||
.fault = spufs_mss_mmap_fault,
|
||||
};
|
||||
|
||||
@@ -1458,7 +1458,7 @@ spufs_psmap_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_psmap_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_psmap_mmap_vmops = {
|
||||
.fault = spufs_psmap_mmap_fault,
|
||||
};
|
||||
|
||||
@@ -1517,7 +1517,7 @@ spufs_mfc_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct spufs_mfc_mmap_vmops = {
|
||||
static const struct vm_operations_struct spufs_mfc_mmap_vmops = {
|
||||
.fault = spufs_mfc_mmap_fault,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -266,7 +266,7 @@ void pcibios_set_master(struct pci_dev *dev)
|
||||
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct pci_mmap_ops = {
|
||||
static const struct vm_operations_struct pci_mmap_ops = {
|
||||
.access = generic_access_phys,
|
||||
};
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ struct agp_bridge_driver {
|
||||
struct agp_bridge_data {
|
||||
const struct agp_version *version;
|
||||
const struct agp_bridge_driver *driver;
|
||||
struct vm_operations_struct *vm_ops;
|
||||
const struct vm_operations_struct *vm_ops;
|
||||
void *previous_size;
|
||||
void *current_size;
|
||||
void *dev_private_data;
|
||||
|
||||
@@ -40,7 +40,7 @@ static struct aper_size_info_fixed alpha_core_agp_sizes[] =
|
||||
{ 0, 0, 0 }, /* filled in by alpha_core_agp_setup */
|
||||
};
|
||||
|
||||
struct vm_operations_struct alpha_core_agp_vm_ops = {
|
||||
static const struct vm_operations_struct alpha_core_agp_vm_ops = {
|
||||
.fault = alpha_core_agp_vm_fault,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -301,7 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma)
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct vm_operations_struct mmap_mem_ops = {
|
||||
static const struct vm_operations_struct mmap_mem_ops = {
|
||||
#ifdef CONFIG_HAVE_IOREMAP_PROT
|
||||
.access = generic_access_phys
|
||||
#endif
|
||||
|
||||
@@ -239,7 +239,7 @@ mspec_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return VM_FAULT_NOPAGE;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct mspec_vm_ops = {
|
||||
static const struct vm_operations_struct mspec_vm_ops = {
|
||||
.open = mspec_open,
|
||||
.close = mspec_close,
|
||||
.fault = mspec_fault,
|
||||
|
||||
@@ -369,28 +369,28 @@ static int drm_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
}
|
||||
|
||||
/** AGP virtual memory operations */
|
||||
static struct vm_operations_struct drm_vm_ops = {
|
||||
static const struct vm_operations_struct drm_vm_ops = {
|
||||
.fault = drm_vm_fault,
|
||||
.open = drm_vm_open,
|
||||
.close = drm_vm_close,
|
||||
};
|
||||
|
||||
/** Shared virtual memory operations */
|
||||
static struct vm_operations_struct drm_vm_shm_ops = {
|
||||
static const struct vm_operations_struct drm_vm_shm_ops = {
|
||||
.fault = drm_vm_shm_fault,
|
||||
.open = drm_vm_open,
|
||||
.close = drm_vm_shm_close,
|
||||
};
|
||||
|
||||
/** DMA virtual memory operations */
|
||||
static struct vm_operations_struct drm_vm_dma_ops = {
|
||||
static const struct vm_operations_struct drm_vm_dma_ops = {
|
||||
.fault = drm_vm_dma_fault,
|
||||
.open = drm_vm_open,
|
||||
.close = drm_vm_close,
|
||||
};
|
||||
|
||||
/** Scatter-gather virtual memory operations */
|
||||
static struct vm_operations_struct drm_vm_sg_ops = {
|
||||
static const struct vm_operations_struct drm_vm_sg_ops = {
|
||||
.fault = drm_vm_sg_fault,
|
||||
.open = drm_vm_open,
|
||||
.close = drm_vm_close,
|
||||
|
||||
@@ -530,7 +530,7 @@ void radeon_ttm_fini(struct radeon_device *rdev)
|
||||
}
|
||||
|
||||
static struct vm_operations_struct radeon_ttm_vm_ops;
|
||||
static struct vm_operations_struct *ttm_vm_ops = NULL;
|
||||
static const struct vm_operations_struct *ttm_vm_ops = NULL;
|
||||
|
||||
static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ static void ttm_bo_vm_close(struct vm_area_struct *vma)
|
||||
vma->vm_private_data = NULL;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ttm_bo_vm_ops = {
|
||||
static const struct vm_operations_struct ttm_bo_vm_ops = {
|
||||
.fault = ttm_bo_vm_fault,
|
||||
.open = ttm_bo_vm_open,
|
||||
.close = ttm_bo_vm_close
|
||||
|
||||
@@ -247,7 +247,7 @@ static int dma_region_pagefault(struct vm_area_struct *vma,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct dma_region_vm_ops = {
|
||||
static const struct vm_operations_struct dma_region_vm_ops = {
|
||||
.fault = dma_region_pagefault,
|
||||
};
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ static void ehca_mm_close(struct vm_area_struct *vma)
|
||||
vma->vm_start, vma->vm_end, *count);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct vm_ops = {
|
||||
static const struct vm_operations_struct vm_ops = {
|
||||
.open = ehca_mm_open,
|
||||
.close = ehca_mm_close,
|
||||
};
|
||||
|
||||
@@ -1151,7 +1151,7 @@ static int ipath_file_vma_fault(struct vm_area_struct *vma,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ipath_file_vm_ops = {
|
||||
static const struct vm_operations_struct ipath_file_vm_ops = {
|
||||
.fault = ipath_file_vma_fault,
|
||||
};
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ static void ipath_vma_close(struct vm_area_struct *vma)
|
||||
kref_put(&ip->ref, ipath_release_mmap_info);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ipath_vm_ops = {
|
||||
static const struct vm_operations_struct ipath_vm_ops = {
|
||||
.open = ipath_vma_open,
|
||||
.close = ipath_vma_close,
|
||||
};
|
||||
|
||||
@@ -1325,7 +1325,7 @@ static void cafe_v4l_vm_close(struct vm_area_struct *vma)
|
||||
mutex_unlock(&sbuf->cam->s_mutex);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct cafe_v4l_vm_ops = {
|
||||
static const struct vm_operations_struct cafe_v4l_vm_ops = {
|
||||
.open = cafe_v4l_vm_open,
|
||||
.close = cafe_v4l_vm_close
|
||||
};
|
||||
|
||||
@@ -1496,7 +1496,7 @@ static void et61x251_vm_close(struct vm_area_struct* vma)
|
||||
}
|
||||
|
||||
|
||||
static struct vm_operations_struct et61x251_vm_ops = {
|
||||
static const struct vm_operations_struct et61x251_vm_ops = {
|
||||
.open = et61x251_vm_open,
|
||||
.close = et61x251_vm_close,
|
||||
};
|
||||
|
||||
@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_area_struct *vma)
|
||||
frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct gspca_vm_ops = {
|
||||
static const struct vm_operations_struct gspca_vm_ops = {
|
||||
.open = gspca_vm_open,
|
||||
.close = gspca_vm_close,
|
||||
};
|
||||
|
||||
@@ -1589,7 +1589,7 @@ static void meye_vm_close(struct vm_area_struct *vma)
|
||||
meye.vma_use_count[idx]--;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct meye_vm_ops = {
|
||||
static const struct vm_operations_struct meye_vm_ops = {
|
||||
.open = meye_vm_open,
|
||||
.close = meye_vm_close,
|
||||
};
|
||||
|
||||
@@ -2077,7 +2077,7 @@ static void sn9c102_vm_close(struct vm_area_struct* vma)
|
||||
}
|
||||
|
||||
|
||||
static struct vm_operations_struct sn9c102_vm_ops = {
|
||||
static const struct vm_operations_struct sn9c102_vm_ops = {
|
||||
.open = sn9c102_vm_open,
|
||||
.close = sn9c102_vm_close,
|
||||
};
|
||||
|
||||
@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_area_struct *vma)
|
||||
if (sbuf->mapcount == 0)
|
||||
sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED;
|
||||
}
|
||||
static struct vm_operations_struct stk_v4l_vm_ops = {
|
||||
static const struct vm_operations_struct stk_v4l_vm_ops = {
|
||||
.open = stk_v4l_vm_open,
|
||||
.close = stk_v4l_vm_close
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user