Skip to content

Commit 27d036e

Browse files
Leon Romanovskydledford
authored andcommitted
mm: Remove return value of zap_vma_ptes()
All callers of zap_vma_ptes() are not interested in the return value of that function, so let's simplify its interface and drop the return value. Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 008fba4 commit 27d036e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

include/linux/mm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ enum page_entry_size {
379379
/*
380380
* These are the virtual MM functions - opening of an area, closing and
381381
* unmapping it (needed to keep files on disk up-to-date etc), pointer
382-
* to the functions called when a no-page or a wp-page exception occurs.
382+
* to the functions called when a no-page or a wp-page exception occurs.
383383
*/
384384
struct vm_operations_struct {
385385
void (*open)(struct vm_area_struct * area);
@@ -1267,10 +1267,10 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
12671267
struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
12681268
pmd_t pmd);
12691269

1270-
int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
1271-
unsigned long size);
1270+
void zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
1271+
unsigned long size);
12721272
void zap_page_range(struct vm_area_struct *vma, unsigned long address,
1273-
unsigned long size);
1273+
unsigned long size);
12741274
void unmap_vmas(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
12751275
unsigned long start, unsigned long end);
12761276

mm/memory.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,16 +1660,15 @@ static void zap_page_range_single(struct vm_area_struct *vma, unsigned long addr
16601660
*
16611661
* The entire address range must be fully contained within the vma.
16621662
*
1663-
* Returns 0 if successful.
16641663
*/
1665-
int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
1664+
void zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
16661665
unsigned long size)
16671666
{
16681667
if (address < vma->vm_start || address + size > vma->vm_end ||
16691668
!(vma->vm_flags & VM_PFNMAP))
1670-
return -1;
1669+
return;
1670+
16711671
zap_page_range_single(vma, address, size, NULL);
1672-
return 0;
16731672
}
16741673
EXPORT_SYMBOL_GPL(zap_vma_ptes);
16751674

0 commit comments

Comments
 (0)