lkml.org 
[lkml]   [2019]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 10/17] arm64: trans_pgd: make trans_pgd_map_page generic
> > +/*
> > + * Add map entry to trans_pgd for a base-size page at PTE level.
> > + * page: page to be mapped.
> > + * dst_addr: new VA address for the pages
> > + * pgprot: protection for the page.
>
> For consistency please describe all function parameters. From my experience
> function parameter description is normally done in the C-file that implements
> the logic. Don't ask me why.

Ok, I move the comment, and will describe every parameter. Thank you.

>
> > + */
> > +int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd,
> > + void *page, unsigned long dst_addr, pgprot_t pgprot);
> >
> > #endif /* _ASM_TRANS_TABLE_H */
> > diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
> > index 94ede33bd777..9b75b680ab70 100644
> > --- a/arch/arm64/kernel/hibernate.c
> > +++ b/arch/arm64/kernel/hibernate.c
> > @@ -179,6 +179,12 @@ int arch_hibernation_header_restore(void *addr)
> > }
> > EXPORT_SYMBOL(arch_hibernation_header_restore);
> >
> > +static void *
> > +hibernate_page_alloc(void *arg)
>
> AFAICS no new line needed here.

Right, will fix it.

>
> > +{
> > + return (void *)get_safe_page((gfp_t)(unsigned long)arg);
> > +}
> > +
> > /*
> > * Copies length bytes, starting at src_start into an new page,
> > * perform cache maintenance, then maps it at the specified address low
> > @@ -195,6 +201,10 @@ static int create_safe_exec_page(void *src_start, size_t length,
> > unsigned long dst_addr,
> > phys_addr_t *phys_dst_addr)
> > {
> > + struct trans_pgd_info trans_info = {
> > + .trans_alloc_page = hibernate_page_alloc,
> > + .trans_alloc_arg = (void *)GFP_ATOMIC,
> > + };
>
> New line between end of struct and other variables.

Sure.

>
> With these changes:
> Reviewed-by: Matthias Brugger <mbrugger@suse.com>

Thank you,
Pasha

\
 
 \ /
  Last update: 2019-09-10 11:22    [W:0.049 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site