[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180308040016.GB9082@bombadil.infradead.org>
Date: Wed, 7 Mar 2018 20:00:16 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Toshi Kani <toshi.kani@....com>
Cc: mhocko@...e.com, akpm@...ux-foundation.org, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, bp@...e.de,
catalin.marinas@....com, guohanjun@...wei.com, will.deacon@....com,
wxf.wang@...ilicon.com, linux-mm@...ck.org, x86@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mm/vmalloc: Add interfaces to free unused page table
On Wed, Mar 07, 2018 at 11:32:26AM -0700, Toshi Kani wrote:
> +/**
> + * pud_free_pmd_page - clear pud entry and free pmd page
> + *
> + * Returns 1 on success and 0 on failure (pud not cleared).
> + */
> +int pud_free_pmd_page(pud_t *pud)
> +{
> + return pud_none(*pud);
> +}
Wouldn't it be clearer if you returned 'bool' instead of 'int' here?
Also you didn't document the pud parameter, nor use the approved form
for documenting the return type, nor the calling context. So I would
have written it out like this:
/**
* pud_free_pmd_page - Clear pud entry and free pmd page.
* @pud: Pointer to a PUD.
*
* Context: Caller should hold mmap_sem write-locked.
* Return: %true if clearing the entry succeeded.
*/
Powered by blists - more mailing lists