Commit 932be49b authored by Thorsten Blum's avatar Thorsten Blum Committed by Jonathan Corbet

Documentation: coding-style: Fix indentation in code-blocks

- Remove spaces in C code-blocks to align error labels consistently
- Replace tab characters with spaces in emacs-lisp code blocks
Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240202231316.7606-1-thorsten.blum@toblux.com
parent d74029f6
......@@ -586,9 +586,9 @@ fix for this is to split it up into two error labels ``err_free_bar:`` and
.. code-block:: c
err_free_bar:
err_free_bar:
kfree(foo->bar);
err_free_foo:
err_free_foo:
kfree(foo);
return ret;
......@@ -679,7 +679,7 @@ values. To do the latter, you can stick the following in your .emacs file:
(c-offsets-alist . (
(arglist-close . c-lineup-arglist-tabs-only)
(arglist-cont-nonempty .
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(arglist-intro . +)
(brace-list-intro . +)
(c . c-lineup-C-comments)
......
......@@ -575,9 +575,9 @@ due parti ``err_free_bar:`` e ``err_free_foo:``:
.. code-block:: c
err_free_bar:
err_free_bar:
kfree(foo->bar);
err_free_foo:
err_free_foo:
kfree(foo);
return ret;
......@@ -671,7 +671,7 @@ segue nel vostro file .emacs:
(c-offsets-alist . (
(arglist-close . c-lineup-arglist-tabs-only)
(arglist-cont-nonempty .
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(arglist-intro . +)
(brace-list-intro . +)
(c . c-lineup-C-comments)
......
......@@ -604,9 +604,9 @@ Normalmente la solución para esto es dividirlo en dos etiquetas de error
.. code-block:: c
err_free_bar:
err_free_bar:
kfree(foo->bar);
err_free_foo:
err_free_foo:
kfree(foo);
return ret;
......@@ -698,7 +698,7 @@ sanos. Para hacer esto último, puede pegar lo siguiente en su archivo
(c-offsets-alist . (
(arglist-close . c-lineup-arglist-tabs-only)
(arglist-cont-nonempty .
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))
(arglist-intro . +)
(brace-list-intro . +)
(c . c-lineup-C-comments)
......
......@@ -523,9 +523,9 @@ Linux 里这是提倡的做法,因为这样可以很简单的给读者提供
.. code-block:: c
err_free_bar:
err_free_bar:
kfree(foo->bar);
err_free_foo:
err_free_foo:
kfree(foo);
return ret;
......
......@@ -526,9 +526,9 @@ Linux 裏這是提倡的做法,因爲這樣可以很簡單的給讀者提供
.. code-block:: c
err_free_bar:
err_free_bar:
kfree(foo->bar);
err_free_foo:
err_free_foo:
kfree(foo);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment