Re: [PATCH] x86/mm: drop unused argument sync_global_pgds()
From: Thomas Gleixner
Date: Wed Dec 14 2016 - 17:11:50 EST
On Mon, 12 Dec 2016, Kirill A. Shutemov wrote:
> There's no users that wants sync_global_pgd(.remove=1) sinc af2cf278ef4f
> ("x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()").
>
> Let's drop 'remove'.
The argument is named 'removed' ....
> /*
> - * When memory was added/removed make sure all the processes MM have
> + * When memory was added make sure all the processes MM have
> * suitable PGD entries in the local PGD level page.
> */
> -void sync_global_pgds(unsigned long start, unsigned long end, int removed)
> +void sync_global_pgds(unsigned long start, unsigned long end)
> {
> unsigned long address;
>
> @@ -100,14 +100,6 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
> const pgd_t *pgd_ref = pgd_offset_k(address);
> struct page *page;
>
> - /*
> - * When it is called after memory hot remove, pgd_none()
> - * returns true. In this case (removed == 1), we must clear
> - * the PGD entries in the local PGD level page.
> - */
> - if (pgd_none(*pgd_ref) && !removed)
> - continue;
> -
Errm. This continues, when pgd_none(*pgd_ref) is true AND removed is false,
i.e. that is NOT the removed == true case which you are aiming to drop.
> + if (pgd_none(*pgd))
> + set_pgd(pgd, *pgd_ref);
This is whitespace damaged in several ways.
Thanks,
tglx