Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support / toolchain: use consistent code style for C code
Date: Sat, 8 Feb 2020 22:12:27 +0100	[thread overview]
Message-ID: <20200208211227.GA23769@scaer> (raw)
In-Reply-To: <20200208194400.18754-1-peter@korsgaard.com>

Peter, All,

On 2020-02-08 20:44 +0100, Peter Korsgaard spake thusly:
> Most, but not all our C code follows the Linux kernel code style (as
> documented in Documentation/process/coding-style.rst).  Adjust the few
> places doing differently:
> 
> - Braces:
>   ..but the preferred way, as shown to us by the prophets Kernighan
>   and Ritchie, is to put the opening brace last on the line
> 
> - Spaces after keywords:
>   Use a space after (most) keywords
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

I just dropped the 'support /' from the title, because both really are
pretty much about the toolchain "infra".

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/scripts/check-kernel-headers.sh | 3 +--
>  toolchain/toolchain-wrapper.c           | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/support/scripts/check-kernel-headers.sh b/support/scripts/check-kernel-headers.sh
> index d1864cb05e..841df98b64 100755
> --- a/support/scripts/check-kernel-headers.sh
> +++ b/support/scripts/check-kernel-headers.sh
> @@ -53,8 +53,7 @@ int main(int argc __attribute__((unused)),
>      int l = LINUX_VERSION_CODE & ~0xFF;
>      int h = KERNEL_VERSION(${HDR_M},${HDR_m},0);
>  
> -    if(l != h)
> -    {
> +    if (l != h) {
>          printf("Incorrect selection of kernel headers: ");
>          printf("expected %d.%d.x, got %d.%d.x\n", ${HDR_M}, ${HDR_m},
>                 ((LINUX_VERSION_CODE>>16) & 0xFF),
> diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
> index b7705a4cbf..8cfc963ccd 100644
> --- a/toolchain/toolchain-wrapper.c
> +++ b/toolchain/toolchain-wrapper.c
> @@ -434,7 +434,7 @@ int main(int argc, char **argv)
>  		/* Both args below can be set at compile/link time
>  		 * and are ignored correctly when not used
>  		 */
> -		if(i == argc)
> +		if (i == argc)
>  			*cur++ = "-fPIE";
>  
>  		if (!found_shared)
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

      reply	other threads:[~2020-02-08 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08 19:44 [Buildroot] [PATCH] support / toolchain: use consistent code style for C code Peter Korsgaard
2020-02-08 21:12 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200208211227.GA23769@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox