mm/huge_memory: fix various coding style warnings
Subsystems (2)
PATCH 1/1 mm/huge_memory: fix various coding style warnings
Resolve coding style issues flagged by checkpatch.pl Specifically:
- Add missing blank lines after variable declarations.
- Remove unnecessary braces {} for a single statement block.
No functional changes are introduced.
--- mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
mm/huge_memory.c +4 -2
@@ -1104,6 +1104,7 @@ subsys_initcall(hugepage_init);static int __init setup_transparent_hugepage (char *str) {int ret =0 ; +if (!str) goto out;if (!strcmp (str,"always" )) {
@@ -1510,6 +1511,7 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, struct folio *zero_folio) {pmd_t entry; + entry =folio_mk_pmd (zero_folio, vma->vm_page_prot); entry =pmd_mkspecial (entry);pgtable_trans_huge_deposit (mm, pmd, pgtable);
@@ -2613,6 +2615,7 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,if (pmd_move_must_withdraw (new_ptl, old_ptl, vma)) {pgtable_t pgtable; + pgtable =pgtable_trans_huge_withdraw (mm, old_pmd);pgtable_trans_huge_deposit (mm, new_pmd, pgtable); }
@@ -3901,9 +3904,8 @@ int folio_check_splittable(struct folio *folio, unsigned int new_order,* swapcache folio split. Only uniform split to order-0 can be used * here. */ -if ((split_type ==SPLIT_TYPE_NON_UNIFORM || new_order) &&folio_test_swapcache (folio)) { +if ((split_type ==SPLIT_TYPE_NON_UNIFORM || new_order) &&folio_test_swapcache (folio))return -EINVAL ; - }if (is_huge_zero_folio (folio))return -EINVAL ;
Signature · 1 line
2.55.0
Quoted 9 lines · Christos Skarlos
Resolve coding style issues flagged by checkpatch.pl Specifically:
- Add missing blank lines after variable declarations.
- Remove unnecessary braces {} for a single statement block.No functional changes are introduced.
Signed-off-by Christos Skarlos <[email protected]>---
LGTM,
Quoted 11 lines · Christos Skarlos
Resolve coding style issues flagged by checkpatch.pl Specifically:
- Add missing blank lines after variable declarations.
- Remove unnecessary braces {} for a single statement block.No functional changes are introduced.
Signed-off-by Christos Skarlos <[email protected]>--- mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Best Regards,
Yan, Zi
Quoted 7 lines · Christos Skarlos
Resolve coding style issues flagged by checkpatch.pl Specifically:
- Add missing blank lines after variable declarations.
- Remove unnecessary braces {} for a single statement block.No functional changes are introduced.
Signed-off-by Christos Skarlos <[email protected]>
LGTM so:
Quoted 44 lines
--- mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)mm/huge_memory.c +4
-3@@ -1104,6 +1104,7 @@ subsys_initcall(hugepage_init);static int __init setup_transparent_hugepage (char *str) {int ret =0 ; +if (!str) goto out;if (!strcmp (str,"always" )) {@@ -1510,6 +1511,7 @@ static void set_huge_zero_folio(pgtable_t pgtable, struct mm_struct *mm, struct folio *zero_folio) {pmd_t entry; + entry =folio_mk_pmd (zero_folio, vma->vm_page_prot); entry =pmd_mkspecial (entry);pgtable_trans_huge_deposit (mm, pmd, pgtable);@@ -2613,6 +2615,7 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,if (pmd_move_must_withdraw (new_ptl, old_ptl, vma)) {pgtable_t pgtable; + pgtable =pgtable_trans_huge_withdraw (mm, old_pmd);pgtable_trans_huge_deposit (mm, new_pmd, pgtable); }@@ -3901,9 +3904,8 @@ int folio_check_splittable(struct folio *folio, unsigned int new_order,* swapcache folio split. Only uniform split to order-0 can be used * here. */ -if ((split_type ==SPLIT_TYPE_NON_UNIFORM || new_order) &&folio_test_swapcache (folio)) { +if ((split_type ==SPLIT_TYPE_NON_UNIFORM || new_order) &&folio_test_swapcache (folio))return -EINVAL ; - }if (is_huge_zero_folio (folio))return -EINVAL ; --
Quoted 2 lines
2.55.0
--
Cheers, Lorenzo