Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570985 > unrolled thread

[PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct

Started byLiviu Dudau <Liviu.Dudau@arm.com>
First post2017-01-31 19:50 +0100
Last post2017-01-31 21:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-31 19:50 +0100
    Re: [PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct  vm_operations_struct Daniel Vetter <daniel@ffwll.ch> - 2017-01-31 21:20 +0100

#1570985 — [PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct

FromLiviu Dudau <Liviu.Dudau@arm.com>
Date2017-01-31 19:50 +0100
Subject[PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct
Message-ID<t5LF7-47z-7@gated-at.bofh.it>
drm-mm.rst contains some unformatted dump of the vm_operations_struct
structure. Add some C formatting around it and some context for the
dump. While there, update the structure to resemble the new signature
for the fault handler after commit 25d3db7600b8 (mm, fs: reduce fault,
page_mkwrite, and pfn_mkwrite to take only vmf).

Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
---
 Documentation/gpu/drm-mm.rst | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst
index 91d82f39fbf4..a1c0ae3b2c38 100644
--- a/Documentation/gpu/drm-mm.rst
+++ b/Documentation/gpu/drm-mm.rst
@@ -291,10 +291,17 @@ To use :c:func:`drm_gem_mmap()`, drivers must fill the struct
 :c:type:`struct drm_driver <drm_driver>` gem_vm_ops field
 with a pointer to VM operations.
 
-struct vm_operations_struct \*gem_vm_ops struct
-vm_operations_struct { void (\*open)(struct vm_area_struct \* area);
-void (\*close)(struct vm_area_struct \* area); int (\*fault)(struct
-vm_area_struct \*vma, struct vm_fault \*vmf); };
+The VM operations is a :c:type:`struct vm_operations_struct <vm_operations_struct>`
+made up of several fields, the more interesting ones being:
+
+.. code-block:: c
+
+	struct vm_operations_struct {
+		void (*open)(struct vm_area_struct * area);
+		void (*close)(struct vm_area_struct * area);
+		int (*fault)(struct vm_fault *vmf);
+	};
+
 
 The open and close operations must update the GEM object reference
 count. Drivers can use the :c:func:`drm_gem_vm_open()` and
-- 
2.11.0

[toc] | [next] | [standalone]


#1571058 — Re: [PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-01-31 21:20 +0100
SubjectRe: [PATCH] Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct
Message-ID<t5N4d-55d-17@gated-at.bofh.it>
In reply to#1570985
On Tue, Jan 31, 2017 at 05:41:09PM +0000, Liviu Dudau wrote:
> drm-mm.rst contains some unformatted dump of the vm_operations_struct
> structure. Add some C formatting around it and some context for the
> dump. While there, update the structure to resemble the new signature
> for the fault handler after commit 25d3db7600b8 (mm, fs: reduce fault,
> page_mkwrite, and pfn_mkwrite to take only vmf).
> 
> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>

Applied, thanks.
-Daniel

> ---
>  Documentation/gpu/drm-mm.rst | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst
> index 91d82f39fbf4..a1c0ae3b2c38 100644
> --- a/Documentation/gpu/drm-mm.rst
> +++ b/Documentation/gpu/drm-mm.rst
> @@ -291,10 +291,17 @@ To use :c:func:`drm_gem_mmap()`, drivers must fill the struct
>  :c:type:`struct drm_driver <drm_driver>` gem_vm_ops field
>  with a pointer to VM operations.
>  
> -struct vm_operations_struct \*gem_vm_ops struct
> -vm_operations_struct { void (\*open)(struct vm_area_struct \* area);
> -void (\*close)(struct vm_area_struct \* area); int (\*fault)(struct
> -vm_area_struct \*vma, struct vm_fault \*vmf); };
> +The VM operations is a :c:type:`struct vm_operations_struct <vm_operations_struct>`
> +made up of several fields, the more interesting ones being:
> +
> +.. code-block:: c
> +
> +	struct vm_operations_struct {
> +		void (*open)(struct vm_area_struct * area);
> +		void (*close)(struct vm_area_struct * area);
> +		int (*fault)(struct vm_fault *vmf);
> +	};
> +
>  
>  The open and close operations must update the GEM object reference
>  count. Drivers can use the :c:func:`drm_gem_vm_open()` and
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web