Skip to content

Commit cc71aba

Browse files
vishnu.pstorvalds
authored andcommitted
mm/mmap.c: whitespace fixes
Signed-off-by: vishnu.ps <vishnu.ps@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bf0dea2 commit cc71aba

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

‎mm/mmap.c‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void unmap_region(struct mm_struct *mm,
7070
* MAP_SHARED r: (no) no r: (yes) yes r: (no) yes r: (no) yes
7171
* w: (no) no w: (no) no w: (yes) yes w: (no) no
7272
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
73-
*
73+
*
7474
* MAP_PRIVATE r: (no) no r: (yes) yes r: (no) yes r: (no) yes
7575
* w: (no) no w: (no) no w: (copy) copy w: (no) no
7676
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
@@ -741,7 +741,7 @@ again: remove_next = 1 + (end > next->vm_end);
741741
* split_vma inserting another: so it must be
742742
* mprotect case 4 shifting the boundary down.
743743
*/
744-
adjust_next = - ((vma->vm_end - end) >> PAGE_SHIFT);
744+
adjust_next = -((vma->vm_end - end) >> PAGE_SHIFT);
745745
exporter = vma;
746746
importer = next;
747747
}
@@ -1010,7 +1010,7 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
10101010
struct vm_area_struct *vma_merge(struct mm_struct *mm,
10111011
struct vm_area_struct *prev, unsigned long addr,
10121012
unsigned long end, unsigned long vm_flags,
1013-
struct anon_vma *anon_vma, struct file *file,
1013+
struct anon_vma *anon_vma, struct file *file,
10141014
pgoff_t pgoff, struct mempolicy *policy)
10151015
{
10161016
pgoff_t pglen = (end - addr) >> PAGE_SHIFT;
@@ -1036,7 +1036,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
10361036
* Can it merge with the predecessor?
10371037
*/
10381038
if (prev && prev->vm_end == addr &&
1039-
mpol_equal(vma_policy(prev), policy) &&
1039+
mpol_equal(vma_policy(prev), policy) &&
10401040
can_vma_merge_after(prev, vm_flags,
10411041
anon_vma, file, pgoff)) {
10421042
/*
@@ -1064,7 +1064,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
10641064
* Can this new request be merged in front of next?
10651065
*/
10661066
if (next && end == next->vm_start &&
1067-
mpol_equal(policy, vma_policy(next)) &&
1067+
mpol_equal(policy, vma_policy(next)) &&
10681068
can_vma_merge_before(next, vm_flags,
10691069
anon_vma, file, pgoff+pglen)) {
10701070
if (prev && addr < prev->vm_end) /* case 4 */
@@ -1235,7 +1235,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
12351235
unsigned long flags, unsigned long pgoff,
12361236
unsigned long *populate)
12371237
{
1238-
struct mm_struct * mm = current->mm;
1238+
struct mm_struct *mm = current->mm;
12391239
vm_flags_t vm_flags;
12401240

12411241
*populate = 0;
@@ -1263,7 +1263,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
12631263

12641264
/* offset overflow? */
12651265
if ((pgoff + (len >> PAGE_SHIFT)) < pgoff)
1266-
return -EOVERFLOW;
1266+
return -EOVERFLOW;
12671267

12681268
/* Too many mappings? */
12691269
if (mm->map_count > sysctl_max_map_count)
@@ -1921,7 +1921,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
19211921
info.align_mask = 0;
19221922
return vm_unmapped_area(&info);
19231923
}
1924-
#endif
1924+
#endif
19251925

19261926
/*
19271927
* This mmap-allocator allocates new areas top-down from below the
@@ -2321,13 +2321,13 @@ int expand_stack(struct vm_area_struct *vma, unsigned long address)
23212321
}
23222322

23232323
struct vm_area_struct *
2324-
find_extend_vma(struct mm_struct * mm, unsigned long addr)
2324+
find_extend_vma(struct mm_struct *mm, unsigned long addr)
23252325
{
2326-
struct vm_area_struct * vma;
2326+
struct vm_area_struct *vma;
23272327
unsigned long start;
23282328

23292329
addr &= PAGE_MASK;
2330-
vma = find_vma(mm,addr);
2330+
vma = find_vma(mm, addr);
23312331
if (!vma)
23322332
return NULL;
23332333
if (vma->vm_start <= addr)
@@ -2376,7 +2376,7 @@ static void unmap_region(struct mm_struct *mm,
23762376
struct vm_area_struct *vma, struct vm_area_struct *prev,
23772377
unsigned long start, unsigned long end)
23782378
{
2379-
struct vm_area_struct *next = prev? prev->vm_next: mm->mmap;
2379+
struct vm_area_struct *next = prev ? prev->vm_next : mm->mmap;
23802380
struct mmu_gather tlb;
23812381

23822382
lru_add_drain();
@@ -2423,7 +2423,7 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
24232423
* __split_vma() bypasses sysctl_max_map_count checking. We use this on the
24242424
* munmap path where it doesn't make sense to fail.
24252425
*/
2426-
static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
2426+
static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
24272427
unsigned long addr, int new_below)
24282428
{
24292429
struct vm_area_struct *new;
@@ -2512,7 +2512,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
25122512
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
25132513
return -EINVAL;
25142514

2515-
if ((len = PAGE_ALIGN(len)) == 0)
2515+
len = PAGE_ALIGN(len);
2516+
if (len == 0)
25162517
return -EINVAL;
25172518

25182519
/* Find the first overlapping VMA */
@@ -2558,7 +2559,7 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
25582559
if (error)
25592560
return error;
25602561
}
2561-
vma = prev? prev->vm_next: mm->mmap;
2562+
vma = prev ? prev->vm_next : mm->mmap;
25622563

25632564
/*
25642565
* unlock any mlock()ed ranges before detaching vmas
@@ -2621,10 +2622,10 @@ static inline void verify_mm_writelocked(struct mm_struct *mm)
26212622
*/
26222623
static unsigned long do_brk(unsigned long addr, unsigned long len)
26232624
{
2624-
struct mm_struct * mm = current->mm;
2625-
struct vm_area_struct * vma, * prev;
2625+
struct mm_struct *mm = current->mm;
2626+
struct vm_area_struct *vma, *prev;
26262627
unsigned long flags;
2627-
struct rb_node ** rb_link, * rb_parent;
2628+
struct rb_node **rb_link, *rb_parent;
26282629
pgoff_t pgoff = addr >> PAGE_SHIFT;
26292630
int error;
26302631

0 commit comments

Comments
 (0)