RE: [PATCH] mm/hmm: constify hmm_devmem_page_get_drvdata() parameter
From: Ralph Campbell
Date: Mon Oct 02 2017 - 17:57:20 EST
The use case is when called by struct hmm_devmem_ops.fault() which passes a const struct page * pointer and hmm_devmem_page_get_drvdata() is called to get the private data.
Since HMM was only recently added, it only affects kernels after September 8, 2017.
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@xxxxxxxxxxxxxxxxxxxx]
> Sent: Monday, October 2, 2017 2:41 PM
> To: Jérôme Glisse <jglisse@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; Ralph Campbell
> <rcampbell@xxxxxxxxxx>
> Subject: Re: [PATCH] mm/hmm: constify hmm_devmem_page_get_drvdata()
> parameter
>
> On Mon, 2 Oct 2017 15:32:54 -0400 Jérôme Glisse <jglisse@xxxxxxxxxx>
> wrote:
>
> > From: Ralph Campbell <rcampbell@xxxxxxxxxx>
> >
> > Constify pointer parameter to avoid issue when use from code that only
> > has const struct page pointer to use in the first place.
>
> That's rather vague. Does such calling code exist in the kernel? This affects the
> which-kernel-gets-patched decision.