dma-buf: some kerneldoc formatting fixes

Noticed while reviewing the output. Adds a bunch more links and fixes
the function interface quoting.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201211155843.3348718-2-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter 2020-12-11 16:58:41 +01:00
parent de9114ece5
commit 85804b70cc
2 changed files with 21 additions and 16 deletions

View File

@ -480,7 +480,7 @@ err_alloc_file:
* *
* 4. Once a driver is done with a shared buffer it needs to call * 4. Once a driver is done with a shared buffer it needs to call
* dma_buf_detach() (after cleaning up any mappings) and then release the * dma_buf_detach() (after cleaning up any mappings) and then release the
* reference acquired with dma_buf_get by calling dma_buf_put(). * reference acquired with dma_buf_get() by calling dma_buf_put().
* *
* For the detailed semantics exporters are expected to implement see * For the detailed semantics exporters are expected to implement see
* &dma_buf_ops. * &dma_buf_ops.
@ -496,9 +496,10 @@ err_alloc_file:
* by the exporter. see &struct dma_buf_export_info * by the exporter. see &struct dma_buf_export_info
* for further details. * for further details.
* *
* Returns, on success, a newly created dma_buf object, which wraps the * Returns, on success, a newly created struct dma_buf object, which wraps the
* supplied private data and operations for dma_buf_ops. On either missing * supplied private data and operations for struct dma_buf_ops. On either
* ops, or error in allocating struct dma_buf, will return negative error. * missing ops, or error in allocating struct dma_buf, will return negative
* error.
* *
* For most cases the easiest way to create @exp_info is through the * For most cases the easiest way to create @exp_info is through the
* %DEFINE_DMA_BUF_EXPORT_INFO macro. * %DEFINE_DMA_BUF_EXPORT_INFO macro.
@ -584,7 +585,7 @@ err_module:
EXPORT_SYMBOL_GPL(dma_buf_export); EXPORT_SYMBOL_GPL(dma_buf_export);
/** /**
* dma_buf_fd - returns a file descriptor for the given dma_buf * dma_buf_fd - returns a file descriptor for the given struct dma_buf
* @dmabuf: [in] pointer to dma_buf for which fd is required. * @dmabuf: [in] pointer to dma_buf for which fd is required.
* @flags: [in] flags to give to fd * @flags: [in] flags to give to fd
* *
@ -608,10 +609,10 @@ int dma_buf_fd(struct dma_buf *dmabuf, int flags)
EXPORT_SYMBOL_GPL(dma_buf_fd); EXPORT_SYMBOL_GPL(dma_buf_fd);
/** /**
* dma_buf_get - returns the dma_buf structure related to an fd * dma_buf_get - returns the struct dma_buf related to an fd
* @fd: [in] fd associated with the dma_buf to be returned * @fd: [in] fd associated with the struct dma_buf to be returned
* *
* On success, returns the dma_buf structure associated with an fd; uses * On success, returns the struct dma_buf associated with an fd; uses
* file's refcounting done by fget to increase refcount. returns ERR_PTR * file's refcounting done by fget to increase refcount. returns ERR_PTR
* otherwise. * otherwise.
*/ */
@ -653,8 +654,7 @@ void dma_buf_put(struct dma_buf *dmabuf)
EXPORT_SYMBOL_GPL(dma_buf_put); EXPORT_SYMBOL_GPL(dma_buf_put);
/** /**
* dma_buf_dynamic_attach - Add the device to dma_buf's attachments list; optionally, * dma_buf_dynamic_attach - Add the device to dma_buf's attachments list
* calls attach() of dma_buf_ops to allow device-specific attach functionality
* @dmabuf: [in] buffer to attach device to. * @dmabuf: [in] buffer to attach device to.
* @dev: [in] device to be attached. * @dev: [in] device to be attached.
* @importer_ops: [in] importer operations for the attachment * @importer_ops: [in] importer operations for the attachment
@ -663,6 +663,9 @@ EXPORT_SYMBOL_GPL(dma_buf_put);
* Returns struct dma_buf_attachment pointer for this attachment. Attachments * Returns struct dma_buf_attachment pointer for this attachment. Attachments
* must be cleaned up by calling dma_buf_detach(). * must be cleaned up by calling dma_buf_detach().
* *
* Optionally this calls &dma_buf_ops.attach to allow device-specific attach
* functionality.
*
* Returns: * Returns:
* *
* A pointer to newly created &dma_buf_attachment on success, or a negative * A pointer to newly created &dma_buf_attachment on success, or a negative
@ -769,12 +772,13 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
EXPORT_SYMBOL_GPL(dma_buf_attach); EXPORT_SYMBOL_GPL(dma_buf_attach);
/** /**
* dma_buf_detach - Remove the given attachment from dmabuf's attachments list; * dma_buf_detach - Remove the given attachment from dmabuf's attachments list
* optionally calls detach() of dma_buf_ops for device-specific detach
* @dmabuf: [in] buffer to detach from. * @dmabuf: [in] buffer to detach from.
* @attach: [in] attachment to be detached; is free'd after this call. * @attach: [in] attachment to be detached; is free'd after this call.
* *
* Clean up a device attachment obtained by calling dma_buf_attach(). * Clean up a device attachment obtained by calling dma_buf_attach().
*
* Optionally this calls &dma_buf_ops.detach for device-specific detach.
*/ */
void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)
{ {
@ -1061,11 +1065,12 @@ EXPORT_SYMBOL_GPL(dma_buf_move_notify);
* shootdowns would increase the complexity quite a bit. * shootdowns would increase the complexity quite a bit.
* *
* Interface:: * Interface::
*
* int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*, * int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*,
* unsigned long); * unsigned long);
* *
* If the importing subsystem simply provides a special-purpose mmap call to * If the importing subsystem simply provides a special-purpose mmap call to
* set up a mapping in userspace, calling do_mmap with dma_buf->file will * set up a mapping in userspace, calling do_mmap with &dma_buf.file will
* equally achieve that for a dma-buf object. * equally achieve that for a dma-buf object.
*/ */

View File

@ -85,10 +85,10 @@ struct dma_buf_ops {
/** /**
* @pin: * @pin:
* *
* This is called by dma_buf_pin and lets the exporter know that the * This is called by dma_buf_pin() and lets the exporter know that the
* DMA-buf can't be moved any more. * DMA-buf can't be moved any more.
* *
* This is called with the dmabuf->resv object locked and is mutual * This is called with the &dmabuf.resv object locked and is mutual
* exclusive with @cache_sgt_mapping. * exclusive with @cache_sgt_mapping.
* *
* This callback is optional and should only be used in limited use * This callback is optional and should only be used in limited use
@ -103,7 +103,7 @@ struct dma_buf_ops {
/** /**
* @unpin: * @unpin:
* *
* This is called by dma_buf_unpin and lets the exporter know that the * This is called by dma_buf_unpin() and lets the exporter know that the
* DMA-buf can be moved again. * DMA-buf can be moved again.
* *
* This is called with the dmabuf->resv object locked and is mutual * This is called with the dmabuf->resv object locked and is mutual