* [PATCH] mm/huge_memory: fix various coding style warnings
@ 2026-09-03 9:22 Christos Skarlos
2026-09-03 9:53 ` Barry Song
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christos Skarlos @ 2026-09-03 9:22 UTC (permalink / raw)
To: akpm, david, ljs
Cc: ziy, baolin.wang, liam, nico.pache, ryan.roberts, dev.jain,
baohua, lance.yang, usama.arif, linux-mm, linux-kernel,
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 <christosskarlos.kernel@gmail.com>
---
mm/huge_memory.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index ced400f72d43..371ee8d38c45 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -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;
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/huge_memory: fix various coding style warnings
2026-09-03 9:22 [PATCH] mm/huge_memory: fix various coding style warnings Christos Skarlos
@ 2026-09-03 9:53 ` Barry Song
2026-09-03 13:50 ` Zi Yan
2026-09-03 14:10 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 4+ messages in thread
From: Barry Song @ 2026-09-03 9:53 UTC (permalink / raw)
To: Christos Skarlos
Cc: akpm, david, ljs, ziy, baolin.wang, liam, nico.pache,
ryan.roberts, dev.jain, lance.yang, usama.arif, linux-mm,
linux-kernel
On Thu, Sep 3, 2026 at 5:25 PM Christos Skarlos
<christosskarlos.kernel@gmail.com> wrote:
>
> 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 <christosskarlos.kernel@gmail.com>
> ---
LGTM,
Reviewed-by: Barry Song <baohua@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/huge_memory: fix various coding style warnings
2026-09-03 9:22 [PATCH] mm/huge_memory: fix various coding style warnings Christos Skarlos
2026-09-03 9:53 ` Barry Song
@ 2026-09-03 13:50 ` Zi Yan
2026-09-03 14:10 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 4+ messages in thread
From: Zi Yan @ 2026-09-03 13:50 UTC (permalink / raw)
To: Christos Skarlos
Cc: akpm, david, ljs, baolin.wang, liam, nico.pache, ryan.roberts,
dev.jain, baohua, lance.yang, usama.arif, linux-mm, linux-kernel
On 3 Sep 2026, at 5:22, Christos Skarlos wrote:
> 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 <christosskarlos.kernel@gmail.com>
> ---
> mm/huge_memory.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/huge_memory: fix various coding style warnings
2026-09-03 9:22 [PATCH] mm/huge_memory: fix various coding style warnings Christos Skarlos
2026-09-03 9:53 ` Barry Song
2026-09-03 13:50 ` Zi Yan
@ 2026-09-03 14:10 ` Lorenzo Stoakes (ARM)
2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-09-03 14:10 UTC (permalink / raw)
To: Christos Skarlos
Cc: akpm, david, ziy, baolin.wang, liam, nico.pache, ryan.roberts,
dev.jain, baohua, lance.yang, usama.arif, linux-mm, linux-kernel
On Thu, Sep 03, 2026 at 12:22:00PM +0300, Christos Skarlos wrote:
> 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 <christosskarlos.kernel@gmail.com>
LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> mm/huge_memory.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index ced400f72d43..371ee8d38c45 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -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;
> --
> 2.55.0
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-03 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 9:22 [PATCH] mm/huge_memory: fix various coding style warnings Christos Skarlos
2026-09-03 9:53 ` Barry Song
2026-09-03 13:50 ` Zi Yan
2026-09-03 14:10 ` Lorenzo Stoakes (ARM)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox