Skip to contentSkip to conversation

Docs/driver-api/uio-howto: document mmap_prepare callback

PATCH Applied Doehyun Baek 4 participants 4 messages Jun 22 – Jun 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Docs/driver-api/uio-howto: document mmap_prepare callback

The UIO howto still documents an mmap callback in struct uio_info. That field was replaced by mmap_prepare, which takes a struct vm_area_desc.

A UIO driver following the current howto no longer builds because struct uio_info has no mmap member. Update the documented callback signature and matching text to match the current API.

Fixes 933f05f58ac6 ("uio: replace deprecated mmap hook with mmap_prepare in uio_info")
---
 Documentation/driver-api/uio-howto.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/driver-api/uio-howto.rst +2 -2
index 907ffa3b38f5..c08472dfbcfe 100644
@@ -246,10 +246,10 @@ the members are required, others are optional.
    hardware interrupt number. The flags given here will be used in the
    call to :c:func:`request_irq()`.
 
--  ``int (*mmap)(struct uio_info *info, struct vm_area_struct *vma)``:
+-  ``int (*mmap_prepare)(struct uio_info *info, struct vm_area_desc *desc)``:
    Optional. If you need a special :c:func:`mmap()`
    function, you can set it here. If this pointer is not NULL, your
-   :c:func:`mmap()` will be called instead of the built-in one.
+   ``mmap_prepare`` will be called instead of the built-in one.
 
 -  ``int (*open)(struct uio_info *info, struct inode *inode)``:
    Optional. You might want to have your own :c:func:`open()`,

base-commit: 1dc18801be29bc54709aa355b8acd80e183b03cd

Signature · 1 line
2.43.0
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Doehyun Baek

The UIO howto still documents an mmap callback in struct uio_info. That field was replaced by mmap_prepare, which takes a struct vm_area_desc.

A UIO driver following the current howto no longer builds because struct uio_info has no mmap member. Update the documented callback signature and matching text to match the current API.

Fixes 933f05f58ac6 ("uio: replace deprecated mmap hook with mmap_prepare in uio_info")

Thanks.

Quoted 23 lines
---
 Documentation/driver-api/uio-howto.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/driver-api/uio-howto.rst +2 -2
index 907ffa3b38f5..c08472dfbcfe 100644
@@ -246,10 +246,10 @@ the members are required, others are optional.
    hardware interrupt number. The flags given here will be used in the
    call to :c:func:`request_irq()`.
 
--  ``int (*mmap)(struct uio_info *info, struct vm_area_struct *vma)``:
+-  ``int (*mmap_prepare)(struct uio_info *info, struct vm_area_desc *desc)``:
    Optional. If you need a special :c:func:`mmap()`
    function, you can set it here. If this pointer is not NULL, your
-   :c:func:`mmap()` will be called instead of the built-in one.
+   ``mmap_prepare`` will be called instead of the built-in one.
 
 -  ``int (*open)(struct uio_info *info, struct inode *inode)``:
    Optional. You might want to have your own :c:func:`open()`,

base-commit: 1dc18801be29bc54709aa355b8acd80e183b03cd

Signature · 1 line
~Randy
Reviewed-by on v1 1/1
#2 lore raw
In reply to Doehyun Baek
Quoted 10 lines · Doehyun Baek

The UIO howto still documents an mmap callback in struct uio_info. That field was replaced by mmap_prepare, which takes a struct vm_area_desc.

A UIO driver following the current howto no longer builds because struct uio_info has no mmap member. Update the documented callback signature and matching text to match the current API.

Fixes 933f05f58ac6 ("uio: replace deprecated mmap hook with mmap_prepare in uio_info")

Ah thanks apologies for missing this! LGTM so:

Quoted 22 lines
---
 Documentation/driver-api/uio-howto.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/driver-api/uio-howto.rst +2 -2
index 907ffa3b38f5..c08472dfbcfe 100644
@@ -246,10 +246,10 @@ the members are required, others are optional.
    hardware interrupt number. The flags given here will be used in the
    call to :c:func:`request_irq()`.
 
--  ``int (*mmap)(struct uio_info *info, struct vm_area_struct *vma)``:
+-  ``int (*mmap_prepare)(struct uio_info *info, struct vm_area_desc *desc)``:
    Optional. If you need a special :c:func:`mmap()`
    function, you can set it here. If this pointer is not NULL, your
-   :c:func:`mmap()` will be called instead of the built-in one.
+   ``mmap_prepare`` will be called instead of the built-in one.
 
 -  ``int (*open)(struct uio_info *info, struct inode *inode)``:
    Optional. You might want to have your own :c:func:`open()`,
Quoted 4 lines

base-commit: 1dc18801be29bc54709aa355b8acd80e183b03cd --
2.43.0

Cheers, Lorenzo

maintainer Applied
#3 lore raw
In reply to Doehyun Baek
Quoted 19 lines · Doehyun Baek

The UIO howto still documents an mmap callback in struct uio_info. That field was replaced by mmap_prepare, which takes a struct vm_area_desc.

A UIO driver following the current howto no longer builds because struct uio_info has no mmap member. Update the documented callback signature and matching text to match the current API.

Fixes 933f05f58ac6 ("uio: replace deprecated mmap hook with mmap_prepare in uio_info")
---
 Documentation/driver-api/uio-howto.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/driver-api/uio-howto.rst +0 -0
index 907ffa3b38f5..c08472dfbcfe 100644

Documentation/driver-api/uio-howto.rst the members are required, others are optional. · line 253

Quoted 10 lines
Documentation/driver-api/uio-howto.rst +2 -2
@@ -246,10 +246,10 @@ the members are required, others are optional.
    hardware interrupt number. The flags given here will be used in the
    call to :c:func:`request_irq()`.
 
--  ``int (*mmap)(struct uio_info *info, struct vm_area_struct *vma)``:
+-  ``int (*mmap_prepare)(struct uio_info *info, struct vm_area_desc *desc)``:
    Optional. If you need a special :c:func:`mmap()`
    function, you can set it here. If this pointer is not NULL, your
-   :c:func:`mmap()` will be called instead of the built-in one.
+   ``mmap_prepare`` will be called instead of the built-in one.
 

Applied, thanks.

jon