* [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
@ 2019-01-09 16:19 Souptick Joarder
2019-01-09 16:20 ` Souptick Joarder
2019-01-09 16:23 ` Matthew Wilcox
0 siblings, 2 replies; 6+ messages in thread
From: Souptick Joarder @ 2019-01-09 16:19 UTC (permalink / raw)
To: akpm; +Cc: jglisse, linux-mm, linux-kernel, willy, dan.j.williams
convert to use vm_fault_t type as return type for
fault handler.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
include/linux/hmm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/hmm.h b/include/linux/hmm.h
index 66f9ebb..7c5ace3 100644
--- a/include/linux/hmm.h
+++ b/include/linux/hmm.h
@@ -468,7 +468,7 @@ struct hmm_devmem_ops {
* Note that mmap semaphore is held in read mode at least when this
* callback occurs, hence the vma is valid upon callback entry.
*/
- int (*fault)(struct hmm_devmem *devmem,
+ vm_fault_t (*fault)(struct hmm_devmem *devmem,
struct vm_area_struct *vma,
unsigned long addr,
const struct page *page,
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
2019-01-09 16:19 [PATCH] include/linux/hmm.h: Convert to use vm_fault_t Souptick Joarder
@ 2019-01-09 16:20 ` Souptick Joarder
2019-01-09 16:20 ` Souptick Joarder
2019-01-09 16:23 ` Matthew Wilcox
1 sibling, 1 reply; 6+ messages in thread
From: Souptick Joarder @ 2019-01-09 16:20 UTC (permalink / raw)
To: Andrew Morton
Cc: jglisse, Linux-MM, linux-kernel, Matthew Wilcox, Dan Williams
On Wed, Jan 9, 2019 at 9:45 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> convert to use vm_fault_t type as return type for
> fault handler.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
kbuild reported a warning during testing of final vm_fault_t patch integrated
in mm tree.
[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190109]
[if your patch is applied to the wrong git tree, please drop us a note
to help improve the system]
url: https://github.com/0day-ci/linux/commits/Souptick-Joarder/mm-Create-the-new-vm_fault_t-type/20190109-154216
>> kernel/memremap.c:46:34: warning: incorrect type in return expression (different base types)
kernel/memremap.c:46:34: expected restricted vm_fault_t
kernel/memremap.c:46:34: got int
This patch has fixed the warning.
> ---
> include/linux/hmm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/hmm.h b/include/linux/hmm.h
> index 66f9ebb..7c5ace3 100644
> --- a/include/linux/hmm.h
> +++ b/include/linux/hmm.h
> @@ -468,7 +468,7 @@ struct hmm_devmem_ops {
> * Note that mmap semaphore is held in read mode at least when this
> * callback occurs, hence the vma is valid upon callback entry.
> */
> - int (*fault)(struct hmm_devmem *devmem,
> + vm_fault_t (*fault)(struct hmm_devmem *devmem,
> struct vm_area_struct *vma,
> unsigned long addr,
> const struct page *page,
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
2019-01-09 16:20 ` Souptick Joarder
@ 2019-01-09 16:20 ` Souptick Joarder
0 siblings, 0 replies; 6+ messages in thread
From: Souptick Joarder @ 2019-01-09 16:20 UTC (permalink / raw)
To: Andrew Morton
Cc: jglisse, Linux-MM, linux-kernel, Matthew Wilcox, Dan Williams
On Wed, Jan 9, 2019 at 9:45 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> convert to use vm_fault_t type as return type for
> fault handler.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
kbuild reported a warning during testing of final vm_fault_t patch integrated
in mm tree.
[auto build test WARNING on linus/master]
[also build test WARNING on v5.0-rc1 next-20190109]
[if your patch is applied to the wrong git tree, please drop us a note
to help improve the system]
url: https://github.com/0day-ci/linux/commits/Souptick-Joarder/mm-Create-the-new-vm_fault_t-type/20190109-154216
>> kernel/memremap.c:46:34: warning: incorrect type in return expression (different base types)
kernel/memremap.c:46:34: expected restricted vm_fault_t
kernel/memremap.c:46:34: got int
This patch has fixed the warning.
> ---
> include/linux/hmm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/hmm.h b/include/linux/hmm.h
> index 66f9ebb..7c5ace3 100644
> --- a/include/linux/hmm.h
> +++ b/include/linux/hmm.h
> @@ -468,7 +468,7 @@ struct hmm_devmem_ops {
> * Note that mmap semaphore is held in read mode at least when this
> * callback occurs, hence the vma is valid upon callback entry.
> */
> - int (*fault)(struct hmm_devmem *devmem,
> + vm_fault_t (*fault)(struct hmm_devmem *devmem,
> struct vm_area_struct *vma,
> unsigned long addr,
> const struct page *page,
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
2019-01-09 16:19 [PATCH] include/linux/hmm.h: Convert to use vm_fault_t Souptick Joarder
2019-01-09 16:20 ` Souptick Joarder
@ 2019-01-09 16:23 ` Matthew Wilcox
2019-01-09 16:41 ` Souptick Joarder
1 sibling, 1 reply; 6+ messages in thread
From: Matthew Wilcox @ 2019-01-09 16:23 UTC (permalink / raw)
To: Souptick Joarder; +Cc: akpm, jglisse, linux-mm, linux-kernel, dan.j.williams
On Wed, Jan 09, 2019 at 09:49:17PM +0530, Souptick Joarder wrote:
> convert to use vm_fault_t type as return type for
> fault handler.
I think you'll also need to convert hmm_devmem_fault(). And that's
going to lead to some more spots.
(It's important to note that this is the patch working as designed. It's
throwing up warnings where code *hasn't* been converted to vm_fault_t yet
but should have been).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
2019-01-09 16:23 ` Matthew Wilcox
@ 2019-01-09 16:41 ` Souptick Joarder
2019-01-09 16:41 ` Souptick Joarder
0 siblings, 1 reply; 6+ messages in thread
From: Souptick Joarder @ 2019-01-09 16:41 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Andrew Morton, jglisse, Linux-MM, linux-kernel, Dan Williams
On Wed, Jan 9, 2019 at 9:53 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Wed, Jan 09, 2019 at 09:49:17PM +0530, Souptick Joarder wrote:
> > convert to use vm_fault_t type as return type for
> > fault handler.
>
> I think you'll also need to convert hmm_devmem_fault(). And that's
> going to lead to some more spots.
I will add it in v2.
>
> (It's important to note that this is the patch working as designed. It's
> throwing up warnings where code *hasn't* been converted to vm_fault_t yet
> but should have been).
Ok.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] include/linux/hmm.h: Convert to use vm_fault_t
2019-01-09 16:41 ` Souptick Joarder
@ 2019-01-09 16:41 ` Souptick Joarder
0 siblings, 0 replies; 6+ messages in thread
From: Souptick Joarder @ 2019-01-09 16:41 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Andrew Morton, jglisse, Linux-MM, linux-kernel, Dan Williams
On Wed, Jan 9, 2019 at 9:53 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Wed, Jan 09, 2019 at 09:49:17PM +0530, Souptick Joarder wrote:
> > convert to use vm_fault_t type as return type for
> > fault handler.
>
> I think you'll also need to convert hmm_devmem_fault(). And that's
> going to lead to some more spots.
I will add it in v2.
>
> (It's important to note that this is the patch working as designed. It's
> throwing up warnings where code *hasn't* been converted to vm_fault_t yet
> but should have been).
Ok.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-09 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 16:19 [PATCH] include/linux/hmm.h: Convert to use vm_fault_t Souptick Joarder
2019-01-09 16:20 ` Souptick Joarder
2019-01-09 16:20 ` Souptick Joarder
2019-01-09 16:23 ` Matthew Wilcox
2019-01-09 16:41 ` Souptick Joarder
2019-01-09 16:41 ` Souptick Joarder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox