linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments
@ 2020-08-25 23:14 Nathan Chancellor
  2020-08-26 13:36 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-08-25 23:14 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek
  Cc: clang-built-linux, linux-kbuild, linux-doc, linux-kernel,
	Nathan Chancellor

While reviewing a separate patch, I noticed that the formatting of the
commands, variables, and arguments was not in a monospaced font like the
rest of the Kbuild documentation (see kbuild/kconfig.rst for an
example). This is due to a lack of "::" before indented command blocks
and single backticks instead of double backticks for inline formatting.

Add those so that the document looks nicer in an HTML format, while not
ruining the look in plain text.

As a result of this, we can remove the escaped backslashes in the last
code block and move them to single backslashes.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 Documentation/kbuild/llvm.rst | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
index 2aac50b97921..334df758dce3 100644
--- a/Documentation/kbuild/llvm.rst
+++ b/Documentation/kbuild/llvm.rst
@@ -23,8 +23,8 @@ supports C and the GNU C extensions required by the kernel, and is pronounced
 Clang
 -----
 
-The compiler used can be swapped out via `CC=` command line argument to `make`.
-`CC=` should be set when selecting a config and during a build.
+The compiler used can be swapped out via ``CC=`` command line argument to ``make``.
+``CC=`` should be set when selecting a config and during a build. ::
 
 	make CC=clang defconfig
 
@@ -34,33 +34,33 @@ Cross Compiling
 ---------------
 
 A single Clang compiler binary will typically contain all supported backends,
-which can help simplify cross compiling.
+which can help simplify cross compiling. ::
 
 	ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
 
-`CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead
-`CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For
-example:
+``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead
+``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For
+example: ::
 
 	clang --target aarch64-linux-gnu foo.c
 
 LLVM Utilities
 --------------
 
-LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1`
-to enable them.
+LLVM has substitutes for GNU binutils utilities. Kbuild supports ``LLVM=1``
+to enable them. ::
 
 	make LLVM=1
 
-They can be enabled individually. The full list of the parameters:
+They can be enabled individually. The full list of the parameters: ::
 
-	make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
-	  OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
-	  READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
+	make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
+	  OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
+	  READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
 	  HOSTLD=ld.lld
 
 Currently, the integrated assembler is disabled by default. You can pass
-`LLVM_IAS=1` to enable it.
+``LLVM_IAS=1`` to enable it.
 
 Getting Help
 ------------

base-commit: abb3438d69fb6dd5baa4ae23eafbf5b87945eff1
-- 
2.28.0


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

* Re: [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments
  2020-08-25 23:14 [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments Nathan Chancellor
@ 2020-08-26 13:36 ` Nick Desaulniers
  2020-08-28 13:38   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2020-08-26 13:36 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Masahiro Yamada, Michal Marek, clang-built-linux,
	Linux Kbuild mailing list, Linux Doc Mailing List, LKML

On Tue, Aug 25, 2020 at 4:14 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> While reviewing a separate patch, I noticed that the formatting of the
> commands, variables, and arguments was not in a monospaced font like the
> rest of the Kbuild documentation (see kbuild/kconfig.rst for an
> example). This is due to a lack of "::" before indented command blocks
> and single backticks instead of double backticks for inline formatting.
>
> Add those so that the document looks nicer in an HTML format, while not
> ruining the look in plain text.
>
> As a result of this, we can remove the escaped backslashes in the last
> code block and move them to single backslashes.
>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Ah, yeah, I saw that. Thanks for the fix!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  Documentation/kbuild/llvm.rst | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
> index 2aac50b97921..334df758dce3 100644
> --- a/Documentation/kbuild/llvm.rst
> +++ b/Documentation/kbuild/llvm.rst
> @@ -23,8 +23,8 @@ supports C and the GNU C extensions required by the kernel, and is pronounced
>  Clang
>  -----
>
> -The compiler used can be swapped out via `CC=` command line argument to `make`.
> -`CC=` should be set when selecting a config and during a build.
> +The compiler used can be swapped out via ``CC=`` command line argument to ``make``.
> +``CC=`` should be set when selecting a config and during a build. ::
>
>         make CC=clang defconfig
>
> @@ -34,33 +34,33 @@ Cross Compiling
>  ---------------
>
>  A single Clang compiler binary will typically contain all supported backends,
> -which can help simplify cross compiling.
> +which can help simplify cross compiling. ::
>
>         ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
>
> -`CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead
> -`CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For
> -example:
> +``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead
> +``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For
> +example: ::
>
>         clang --target aarch64-linux-gnu foo.c
>
>  LLVM Utilities
>  --------------
>
> -LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1`
> -to enable them.
> +LLVM has substitutes for GNU binutils utilities. Kbuild supports ``LLVM=1``
> +to enable them. ::
>
>         make LLVM=1
>
> -They can be enabled individually. The full list of the parameters:
> +They can be enabled individually. The full list of the parameters: ::
>
> -       make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
> -         OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
> -         READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
> +       make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
> +         OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
> +         READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
>           HOSTLD=ld.lld
>
>  Currently, the integrated assembler is disabled by default. You can pass
> -`LLVM_IAS=1` to enable it.
> +``LLVM_IAS=1`` to enable it.
>
>  Getting Help
>  ------------
>
> base-commit: abb3438d69fb6dd5baa4ae23eafbf5b87945eff1
> --
> 2.28.0
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200825231438.15682-1-natechancellor%40gmail.com.



-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments
  2020-08-26 13:36 ` Nick Desaulniers
@ 2020-08-28 13:38   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-08-28 13:38 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Nathan Chancellor, Michal Marek, clang-built-linux,
	Linux Kbuild mailing list, Linux Doc Mailing List, LKML

On Wed, Aug 26, 2020 at 10:36 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Tue, Aug 25, 2020 at 4:14 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > While reviewing a separate patch, I noticed that the formatting of the
> > commands, variables, and arguments was not in a monospaced font like the
> > rest of the Kbuild documentation (see kbuild/kconfig.rst for an
> > example). This is due to a lack of "::" before indented command blocks
> > and single backticks instead of double backticks for inline formatting.
> >
> > Add those so that the document looks nicer in an HTML format, while not
> > ruining the look in plain text.
> >
> > As a result of this, we can remove the escaped backslashes in the last
> > code block and move them to single backslashes.
> >
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Ah, yeah, I saw that. Thanks for the fix!
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> > ---
> >  Documentation/kbuild/llvm.rst | 26 +++++++++++++-------------
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
> > index 2aac50b97921..334df758dce3 100644
> > --- a/Documentation/kbuild/llvm.rst
> > +++ b/Documentation/kbuild/llvm.rst
> > @@ -23,8 +23,8 @@ supports C and the GNU C extensions required by the kernel, and is pronounced
> >  Clang
> >  -----
> >
> > -The compiler used can be swapped out via `CC=` command line argument to `make`.
> > -`CC=` should be set when selecting a config and during a build.
> > +The compiler used can be swapped out via ``CC=`` command line argument to ``make``.
> > +``CC=`` should be set when selecting a config and during a build. ::
> >
> >         make CC=clang defconfig
> >
> > @@ -34,33 +34,33 @@ Cross Compiling
> >  ---------------
> >
> >  A single Clang compiler binary will typically contain all supported backends,
> > -which can help simplify cross compiling.
> > +which can help simplify cross compiling. ::
> >
> >         ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
> >
> > -`CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead
> > -`CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For
> > -example:
> > +``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead
> > +``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For
> > +example: ::
> >
> >         clang --target aarch64-linux-gnu foo.c
> >
> >  LLVM Utilities
> >  --------------
> >
> > -LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1`
> > -to enable them.
> > +LLVM has substitutes for GNU binutils utilities. Kbuild supports ``LLVM=1``
> > +to enable them. ::
> >
> >         make LLVM=1
> >
> > -They can be enabled individually. The full list of the parameters:
> > +They can be enabled individually. The full list of the parameters: ::
> >
> > -       make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
> > -         OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
> > -         READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
> > +       make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
> > +         OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
> > +         READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
> >           HOSTLD=ld.lld
> >
> >  Currently, the integrated assembler is disabled by default. You can pass
> > -`LLVM_IAS=1` to enable it.
> > +``LLVM_IAS=1`` to enable it.
> >
> >  Getting Help
> >  ------------
> >
> > base-commit: abb3438d69fb6dd5baa4ae23eafbf5b87945eff1
> > --


Applied to linux-kbuild/fixes.
Thanks.

-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-08-28 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 23:14 [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments Nathan Chancellor
2020-08-26 13:36 ` Nick Desaulniers
2020-08-28 13:38   ` Masahiro Yamada

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).