]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dma-buf: Add syntax highlighting to code listings in the document
authorTommy Chiang <ototot@chromium.org>
Fri, 19 Jan 2024 03:31:26 +0000 (03:31 +0000)
committerChristian König <christian.koenig@amd.com>
Mon, 23 Sep 2024 14:01:27 +0000 (16:01 +0200)
This patch tries to improve the display of the code listing
on The Linux Kernel documentation website for dma-buf [1] .

Originally, it appears that it was attempting to escape
the '*' character, but looks like it's not necessary (now),
so we are seeing something like '\*' on the webite.

This patch removes these unnecessary backslashes and adds syntax
highlighting to improve the readability of the code listing.

[1] https://docs.kernel.org/driver-api/dma-buf.html

Signed-off-by: Tommy Chiang <ototot@chromium.org>
Reviewed-by: T.J. Mercier <tjmercier@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240119033126.1802711-1-ototot@chromium.org
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/dma-buf/dma-buf.c

index 8892bc701a662d89ef74264eaeb3b733259755fa..fbbb750bc5b19bca7d309b81f7291a3d2edbf6c7 100644 (file)
@@ -1296,10 +1296,12 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_move_notify, DMA_BUF);
  *   vmap interface is introduced. Note that on very old 32-bit architectures
  *   vmalloc space might be limited and result in vmap calls failing.
  *
- *   Interfaces::
+ *   Interfaces:
  *
- *      void \*dma_buf_vmap(struct dma_buf \*dmabuf, struct iosys_map \*map)
- *      void dma_buf_vunmap(struct dma_buf \*dmabuf, struct iosys_map \*map)
+ *   .. code-block:: c
+ *
+ *     void *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
+ *     void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)
  *
  *   The vmap call can fail if there is no vmap support in the exporter, or if
  *   it runs out of vmalloc space. Note that the dma-buf layer keeps a reference
@@ -1356,10 +1358,11 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_move_notify, DMA_BUF);
  *   enough, since adding interfaces to intercept pagefaults and allow pte
  *   shootdowns would increase the complexity quite a bit.
  *
- *   Interface::
+ *   Interface:
+ *
+ *   .. code-block:: c
  *
- *      int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*,
- *                    unsigned long);
+ *     int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long);
  *
  *   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