diff mbox series

[1/3] arm64: mmu: update paging_init comments

Message ID 20190213094831.7292-1-peng.fan@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/3] arm64: mmu: update paging_init comments | expand

Commit Message

Peng Fan Feb. 13, 2019, 9:37 a.m. UTC
The comments has not been changed since the function introduced, but the
function has been changed dramatically, so update the comments to
reflect the code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/mm/mmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Rutland Feb. 13, 2019, 11:18 a.m. UTC | #1
On Wed, Feb 13, 2019 at 09:37:24AM +0000, Peng Fan wrote:
> The comments has not been changed since the function introduced, but the
> function has been changed dramatically, so update the comments to
> reflect the code.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/mm/mmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index d6b6f1b169bb..065202da3ad2 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -655,8 +655,8 @@ static void __init map_kernel(pgd_t *pgdp)
>  }
>  
>  /*
> - * paging_init() sets up the page tables, initialises the zone memory
> - * maps and sets up the zero page.
> + * paging_init() sets up the page tables, switch ttbr1 from init_pg_dir
> + * to swapper_pg_dir, free init_pg_dir memblock and permit memblock resizing.
>   */

I think that it would be better to remove the comment entirely. This
doesn't explain the intent, or rationale, and all this information is
obvious from a straight-line reading of the code.

If you remove the comment instead:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

>  void __init paging_init(void)
>  {
> -- 
> 2.16.4
>
Peng Fan Feb. 13, 2019, 11:49 a.m. UTC | #2
Hi Mark,

> -----Original Message-----
> From: Mark Rutland [mailto:mark.rutland@arm.com]
> Sent: 2019年2月13日 19:19
> To: Peng Fan <peng.fan@nxp.com>
> Cc: catalin.marinas@arm.com; will.deacon@arm.com;
> ard.biesheuvel@linaro.org; yaojun8558363@gmail.com;
> cpandya@codeaurora.org; robin.murphy@arm.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> van.freenix@gmail.com
> Subject: Re: [PATCH 1/3] arm64: mmu: update paging_init comments
> 
> On Wed, Feb 13, 2019 at 09:37:24AM +0000, Peng Fan wrote:
> > The comments has not been changed since the function introduced, but
> > the function has been changed dramatically, so update the comments to
> > reflect the code.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  arch/arm64/mm/mmu.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index
> > d6b6f1b169bb..065202da3ad2 100644
> > --- a/arch/arm64/mm/mmu.c
> > +++ b/arch/arm64/mm/mmu.c
> > @@ -655,8 +655,8 @@ static void __init map_kernel(pgd_t *pgdp)  }
> >
> >  /*
> > - * paging_init() sets up the page tables, initialises the zone memory
> > - * maps and sets up the zero page.
> > + * paging_init() sets up the page tables, switch ttbr1 from
> > + init_pg_dir
> > + * to swapper_pg_dir, free init_pg_dir memblock and permit memblock
> resizing.
> >   */
> 
> I think that it would be better to remove the comment entirely. This doesn't
> explain the intent, or rationale, and all this information is obvious from a
> straight-line reading of the code.
> 
> If you remove the comment instead:
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>

I'll remove the comment with you a-b added.

Thanks,
Peng.
> 
> Mark.
> 
> >  void __init paging_init(void)
> >  {
> > --
> > 2.16.4
> >
diff mbox series

Patch

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index d6b6f1b169bb..065202da3ad2 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -655,8 +655,8 @@  static void __init map_kernel(pgd_t *pgdp)
 }
 
 /*
- * paging_init() sets up the page tables, initialises the zone memory
- * maps and sets up the zero page.
+ * paging_init() sets up the page tables, switch ttbr1 from init_pg_dir
+ * to swapper_pg_dir, free init_pg_dir memblock and permit memblock resizing.
  */
 void __init paging_init(void)
 {