linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: docs: Fix code block indentation in ALSA driver example
@ 2023-05-03  3:54 Bagas Sanjaya
  2023-05-03  6:09 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Bagas Sanjaya @ 2023-05-03  3:54 UTC (permalink / raw)
  To: Linux ALSA Subsystem Development, Linux Documentation,
	Linux Kernel Mailing List
  Cc: Jaroslav Kysela, Takashi Iwai, Jonathan Corbet,
	Oswald Buddenhagen, Miquel Raynal, Takashi Sakamoto,
	Bagas Sanjaya, kernel test robot

Sphinx reports htmldocs warnings:

Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3997: WARNING: Literal block expected; none found.
Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4004: WARNING: Literal block expected; none found.
Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4009: WARNING: Unexpected indentation.
Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4035: WARNING: Literal block expected; none found.

These are due to indentation of example driver snippets which is outside
the code block scope.

Fix these by indenting code blocks in question to the scope.

Fixes: 4d421eebe1465d ("ALSA: docs: writing-an-alsa-driver.rst: polishing")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/linux-doc/202305021822.4U6XOvGf-lkp@intel.com/
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 .../kernel-api/writing-an-alsa-driver.rst     | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
index c0f97b5e424969..4335c98b3d828f 100644
--- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
+++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
@@ -3994,21 +3994,21 @@ Driver with A Single Source File
 
    Suppose you have a file xyz.c. Add the following two lines::
 
-  snd-xyz-objs := xyz.o
-  obj-$(CONFIG_SND_XYZ) += snd-xyz.o
+     snd-xyz-objs := xyz.o
+     obj-$(CONFIG_SND_XYZ) += snd-xyz.o
 
 2. Create the Kconfig entry
 
    Add the new entry of Kconfig for your xyz driver::
 
-  config SND_XYZ
-    tristate "Foobar XYZ"
-    depends on SND
-    select SND_PCM
-    help
-      Say Y here to include support for Foobar XYZ soundcard.
-      To compile this driver as a module, choose M here:
-      the module will be called snd-xyz.
+     config SND_XYZ
+       tristate "Foobar XYZ"
+       depends on SND
+       select SND_PCM
+       help
+         Say Y here to include support for Foobar XYZ soundcard.
+         To compile this driver as a module, choose M here:
+         the module will be called snd-xyz.
 
 The line ``select SND_PCM`` specifies that the driver xyz supports PCM.
 In addition to SND_PCM, the following components are supported for
@@ -4032,7 +4032,7 @@ located in the new subdirectory, sound/pci/xyz.
 1. Add a new directory (``sound/pci/xyz``) in ``sound/pci/Makefile``
    as below::
 
-  obj-$(CONFIG_SND) += sound/pci/xyz/
+     obj-$(CONFIG_SND) += sound/pci/xyz/
 
 
 2. Under the directory ``sound/pci/xyz``, create a Makefile::

base-commit: 348551ddaf311c76b01cdcbaf61b6fef06a49144
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: docs: Fix code block indentation in ALSA driver example
  2023-05-03  3:54 [PATCH] ALSA: docs: Fix code block indentation in ALSA driver example Bagas Sanjaya
@ 2023-05-03  6:09 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-05-03  6:09 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Linux ALSA Subsystem Development, Linux Documentation,
	Linux Kernel Mailing List, Jaroslav Kysela, Takashi Iwai,
	Jonathan Corbet, Oswald Buddenhagen, Miquel Raynal,
	Takashi Sakamoto, kernel test robot

On Wed, 03 May 2023 05:54:16 +0200,
Bagas Sanjaya wrote:
> 
> Sphinx reports htmldocs warnings:
> 
> Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3997: WARNING: Literal block expected; none found.
> Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4004: WARNING: Literal block expected; none found.
> Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4009: WARNING: Unexpected indentation.
> Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4035: WARNING: Literal block expected; none found.
> 
> These are due to indentation of example driver snippets which is outside
> the code block scope.
> 
> Fix these by indenting code blocks in question to the scope.
> 
> Fixes: 4d421eebe1465d ("ALSA: docs: writing-an-alsa-driver.rst: polishing")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/linux-doc/202305021822.4U6XOvGf-lkp@intel.com/
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-03  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03  3:54 [PATCH] ALSA: docs: Fix code block indentation in ALSA driver example Bagas Sanjaya
2023-05-03  6:09 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).