Commit 32f84528fbb5177275193a3311be8756f0cbd62c

Authored by Chris Forbes
Committed by Linus Torvalds
1 parent d788e80a8c

mm: hugetlb: fix coding style issues

Fix coding style issues flagged by checkpatch.pl

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 15 additions and 16 deletions Side-by-side Diff

... ... @@ -24,7 +24,7 @@
24 24  
25 25 #include <asm/page.h>
26 26 #include <asm/pgtable.h>
27   -#include <asm/io.h>
  27 +#include <linux/io.h>
28 28  
29 29 #include <linux/hugetlb.h>
30 30 #include <linux/node.h>
31 31  
... ... @@ -62,10 +62,10 @@
62 62 * must either hold the mmap_sem for write, or the mmap_sem for read and
63 63 * the hugetlb_instantiation mutex:
64 64 *
65   - * down_write(&mm->mmap_sem);
  65 + * down_write(&mm->mmap_sem);
66 66 * or
67   - * down_read(&mm->mmap_sem);
68   - * mutex_lock(&hugetlb_instantiation_mutex);
  67 + * down_read(&mm->mmap_sem);
  68 + * mutex_lock(&hugetlb_instantiation_mutex);
69 69 */
70 70 struct file_region {
71 71 struct list_head link;
... ... @@ -503,9 +503,10 @@
503 503 h->nr_huge_pages--;
504 504 h->nr_huge_pages_node[page_to_nid(page)]--;
505 505 for (i = 0; i < pages_per_huge_page(h); i++) {
506   - page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
507   - 1 << PG_dirty | 1 << PG_active | 1 << PG_reserved |
508   - 1 << PG_private | 1<< PG_writeback);
  506 + page[i].flags &= ~(1 << PG_locked | 1 << PG_error |
  507 + 1 << PG_referenced | 1 << PG_dirty |
  508 + 1 << PG_active | 1 << PG_reserved |
  509 + 1 << PG_private | 1 << PG_writeback);
509 510 }
510 511 set_compound_page_dtor(page, NULL);
511 512 set_page_refcounted(page);
... ... @@ -591,7 +592,6 @@
591 592  
592 593 return dtor == free_huge_page;
593 594 }
594   -
595 595 EXPORT_SYMBOL_GPL(PageHuge);
596 596  
597 597 static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid)
598 598  
... ... @@ -2132,9 +2132,8 @@
2132 2132 pte_t entry;
2133 2133  
2134 2134 entry = pte_mkwrite(pte_mkdirty(huge_ptep_get(ptep)));
2135   - if (huge_ptep_set_access_flags(vma, address, ptep, entry, 1)) {
  2135 + if (huge_ptep_set_access_flags(vma, address, ptep, entry, 1))
2136 2136 update_mmu_cache(vma, address, ptep);
2137   - }
2138 2137 }
2139 2138  
2140 2139  
2141 2140  
... ... @@ -2189,9 +2188,9 @@
2189 2188 if (huge_pte_none(pte) || pte_present(pte))
2190 2189 return 0;
2191 2190 swp = pte_to_swp_entry(pte);
2192   - if (non_swap_entry(swp) && is_migration_entry(swp)) {
  2191 + if (non_swap_entry(swp) && is_migration_entry(swp))
2193 2192 return 1;
2194   - } else
  2193 + else
2195 2194 return 0;
2196 2195 }
2197 2196  
2198 2197  
... ... @@ -2202,9 +2201,9 @@
2202 2201 if (huge_pte_none(pte) || pte_present(pte))
2203 2202 return 0;
2204 2203 swp = pte_to_swp_entry(pte);
2205   - if (non_swap_entry(swp) && is_hwpoison_entry(swp)) {
  2204 + if (non_swap_entry(swp) && is_hwpoison_entry(swp))
2206 2205 return 1;
2207   - } else
  2206 + else
2208 2207 return 0;
2209 2208 }
2210 2209  
... ... @@ -2567,7 +2566,7 @@
2567 2566 * So we need to block hugepage fault by PG_hwpoison bit check.
2568 2567 */
2569 2568 if (unlikely(PageHWPoison(page))) {
2570   - ret = VM_FAULT_HWPOISON |
  2569 + ret = VM_FAULT_HWPOISON |
2571 2570 VM_FAULT_SET_HINDEX(h - hstates);
2572 2571 goto backout_unlocked;
2573 2572 }
... ... @@ -2635,7 +2634,7 @@
2635 2634 migration_entry_wait(mm, (pmd_t *)ptep, address);
2636 2635 return 0;
2637 2636 } else if (unlikely(is_hugetlb_entry_hwpoisoned(entry)))
2638   - return VM_FAULT_HWPOISON_LARGE |
  2637 + return VM_FAULT_HWPOISON_LARGE |
2639 2638 VM_FAULT_SET_HINDEX(h - hstates);
2640 2639 }
2641 2640