linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] asm-generic: Fix unistd_32.h generation format
@ 2020-02-12  9:16 Michal Simek
  2020-02-12  9:23 ` Geert Uytterhoeven
  2020-02-12  9:23 ` Max Filippov
  0 siblings, 2 replies; 11+ messages in thread
From: Michal Simek @ 2020-02-12  9:16 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git, arnd, akpm
  Cc: Stefan Asserhall, Chris Zankel, David S. Miller, Fenghua Yu,
	Geert Uytterhoeven, Helge Deller, Ivan Kokshaysky,
	James E.J. Bottomley, Matt Turner, Max Filippov, Rich Felker,
	Richard Henderson, Tony Luck, Yoshinori Sato, linux-alpha,
	linux-ia64, linux-m68k, linux-parisc, linux-sh, linux-xtensa,
	sparclinux

Generated files are also checked by sparse that's why add newline
to remove sparse (C=1) warning.

The issue was found on Microblaze and reported like this:
./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
warning: no newline at end of file

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
---

Changes in v2:
- Update also others archs not just microblaze - Arnd
- Align subject and description to match multiarch chagne

 arch/alpha/kernel/syscalls/syscallhdr.sh      | 1 +
 arch/ia64/kernel/syscalls/syscallhdr.sh       | 1 +
 arch/m68k/kernel/syscalls/syscallhdr.sh       | 1 +
 arch/microblaze/kernel/syscalls/syscallhdr.sh | 1 +
 arch/parisc/kernel/syscalls/syscallhdr.sh     | 1 +
 arch/sh/kernel/syscalls/syscallhdr.sh         | 1 +
 arch/sparc/kernel/syscalls/syscallhdr.sh      | 1 +
 arch/xtensa/kernel/syscalls/syscallhdr.sh     | 1 +
 8 files changed, 8 insertions(+)

diff --git a/arch/alpha/kernel/syscalls/syscallhdr.sh b/arch/alpha/kernel/syscalls/syscallhdr.sh
index e5b99bd2e5e7..524c69fbcab7 100644
--- a/arch/alpha/kernel/syscalls/syscallhdr.sh
+++ b/arch/alpha/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/ia64/kernel/syscalls/syscallhdr.sh b/arch/ia64/kernel/syscalls/syscallhdr.sh
index 0c2d2c748565..8e462a9be54a 100644
--- a/arch/ia64/kernel/syscalls/syscallhdr.sh
+++ b/arch/ia64/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/m68k/kernel/syscalls/syscallhdr.sh b/arch/m68k/kernel/syscalls/syscallhdr.sh
index 6f357d68ef44..8ac15be01ac2 100644
--- a/arch/m68k/kernel/syscalls/syscallhdr.sh
+++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */\n" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/microblaze/kernel/syscalls/syscallhdr.sh b/arch/microblaze/kernel/syscalls/syscallhdr.sh
index 2e9062a926a3..4f4238433644 100644
--- a/arch/microblaze/kernel/syscalls/syscallhdr.sh
+++ b/arch/microblaze/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
index 50242b747d7c..77eb95416eae 100644
--- a/arch/parisc/kernel/syscalls/syscallhdr.sh
+++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/sh/kernel/syscalls/syscallhdr.sh b/arch/sh/kernel/syscalls/syscallhdr.sh
index 1de0334e577f..7c45d405547c 100644
--- a/arch/sh/kernel/syscalls/syscallhdr.sh
+++ b/arch/sh/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/sparc/kernel/syscalls/syscallhdr.sh b/arch/sparc/kernel/syscalls/syscallhdr.sh
index 626b5740a9f1..76e4d1a1f8bf 100644
--- a/arch/sparc/kernel/syscalls/syscallhdr.sh
+++ b/arch/sparc/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
diff --git a/arch/xtensa/kernel/syscalls/syscallhdr.sh b/arch/xtensa/kernel/syscalls/syscallhdr.sh
index d37db641ca31..c946c6b2a506 100644
--- a/arch/xtensa/kernel/syscalls/syscallhdr.sh
+++ b/arch/xtensa/kernel/syscalls/syscallhdr.sh
@@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 	printf "#endif\n"
 	printf "\n"
 	printf "#endif /* %s */" "${fileguard}"
+	printf "\n"
 ) > "$out"
-- 
2.25.0


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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:16 [PATCH v2] asm-generic: Fix unistd_32.h generation format Michal Simek
@ 2020-02-12  9:23 ` Geert Uytterhoeven
  2020-02-12  9:23 ` Max Filippov
  1 sibling, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12  9:23 UTC (permalink / raw)
  To: Michal Simek
  Cc: Linux Kernel Mailing List, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Max Filippov, Rich Felker, Richard Henderson,
	Tony Luck, Yoshinori Sato, alpha, linux-ia64, linux-m68k,
	Parisc List, Linux-sh list, linux-xtensa, sparclinux

Hi Michal,

On Wed, Feb 12, 2020 at 10:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
> Generated files are also checked by sparse that's why add newline
> to remove sparse (C=1) warning.
>
> The issue was found on Microblaze and reported like this:
> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> warning: no newline at end of file
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>

Thanks for your patch!

>  arch/alpha/kernel/syscalls/syscallhdr.sh      | 1 +
>  arch/ia64/kernel/syscalls/syscallhdr.sh       | 1 +
>  arch/m68k/kernel/syscalls/syscallhdr.sh       | 1 +

Bummer, I had noticed that before
https://lore.kernel.org/lkml/CAMuHMdVsBwL9vcqejfc47GN793wMXdQ=SwEsSUP1fbpMt-OoWw@mail.gmail.com/
and even claimed I fixed it while applying
https://lore.kernel.org/lkml/CAMuHMdW6JiponxLiGNEXUX4xJk3hK4b8dTOCNvVBr7s2LyfhJw@mail.gmail.com/
but something must have gone wrong...

>  arch/microblaze/kernel/syscalls/syscallhdr.sh | 1 +
>  arch/parisc/kernel/syscalls/syscallhdr.sh     | 1 +
>  arch/sh/kernel/syscalls/syscallhdr.sh         | 1 +
>  arch/sparc/kernel/syscalls/syscallhdr.sh      | 1 +
>  arch/xtensa/kernel/syscalls/syscallhdr.sh     | 1 +
>  8 files changed, 8 insertions(+)
>
> diff --git a/arch/alpha/kernel/syscalls/syscallhdr.sh b/arch/alpha/kernel/syscalls/syscallhdr.sh
> index e5b99bd2e5e7..524c69fbcab7 100644
> --- a/arch/alpha/kernel/syscalls/syscallhdr.sh
> +++ b/arch/alpha/kernel/syscalls/syscallhdr.sh
> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>         printf "#endif\n"
>         printf "\n"
>         printf "#endif /* %s */" "${fileguard}"
> +       printf "\n"

Why not add the "\n" to the end of the previous line?

Anyway,
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:16 [PATCH v2] asm-generic: Fix unistd_32.h generation format Michal Simek
  2020-02-12  9:23 ` Geert Uytterhoeven
@ 2020-02-12  9:23 ` Max Filippov
  2020-02-12  9:25   ` Geert Uytterhoeven
  2020-02-12  9:26   ` Michal Simek
  1 sibling, 2 replies; 11+ messages in thread
From: Max Filippov @ 2020-02-12  9:23 UTC (permalink / raw)
  To: Michal Simek
  Cc: LKML, Michal Simek, git, Arnd Bergmann, Andrew Morton,
	Stefan Asserhall, Chris Zankel, David S. Miller, Fenghua Yu,
	Geert Uytterhoeven, Helge Deller, Ivan Kokshaysky,
	James E.J. Bottomley, Matt Turner, Rich Felker,
	Richard Henderson, Tony Luck, Yoshinori Sato,
	open list:ALPHA PORT, open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> Generated files are also checked by sparse that's why add newline
> to remove sparse (C=1) warning.
>
> The issue was found on Microblaze and reported like this:
> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> warning: no newline at end of file
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
> ---
>
> Changes in v2:
> - Update also others archs not just microblaze - Arnd
> - Align subject and description to match multiarch chagne
>
>  arch/alpha/kernel/syscalls/syscallhdr.sh      | 1 +
>  arch/ia64/kernel/syscalls/syscallhdr.sh       | 1 +
>  arch/m68k/kernel/syscalls/syscallhdr.sh       | 1 +
>  arch/microblaze/kernel/syscalls/syscallhdr.sh | 1 +
>  arch/parisc/kernel/syscalls/syscallhdr.sh     | 1 +
>  arch/sh/kernel/syscalls/syscallhdr.sh         | 1 +
>  arch/sparc/kernel/syscalls/syscallhdr.sh      | 1 +
>  arch/xtensa/kernel/syscalls/syscallhdr.sh     | 1 +
>  8 files changed, 8 insertions(+)

For xtensa:
Acked-by: Max Filippov <jcmvbkbc@gmail.com>

...

> diff --git a/arch/m68k/kernel/syscalls/syscallhdr.sh b/arch/m68k/kernel/syscalls/syscallhdr.sh
> index 6f357d68ef44..8ac15be01ac2 100644
> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>         printf "#endif\n"
>         printf "\n"
>         printf "#endif /* %s */\n" "${fileguard}"

Here there's already \n at the end, so no need for another one?

> +       printf "\n"
>  ) > "$out"

...

-- 
Thanks.
-- Max

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:23 ` Max Filippov
@ 2020-02-12  9:25   ` Geert Uytterhoeven
  2020-02-12  9:27     ` Michal Simek
  2020-02-12  9:26   ` Michal Simek
  1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12  9:25 UTC (permalink / raw)
  To: Max Filippov
  Cc: Michal Simek, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

Hi Max,

On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >
> > Generated files are also checked by sparse that's why add newline
> > to remove sparse (C=1) warning.
> >
> > The issue was found on Microblaze and reported like this:
> > ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> > warning: no newline at end of file
> >
> > Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>

> > --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
> > +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> > @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> >         printf "#endif\n"
> >         printf "\n"
> >         printf "#endif /* %s */\n" "${fileguard}"
>
> Here there's already \n at the end, so no need for another one?

Thanks! I completely missed that.
So I did fix the original while applying ;-)

> > +       printf "\n"
> >  ) > "$out"

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:23 ` Max Filippov
  2020-02-12  9:25   ` Geert Uytterhoeven
@ 2020-02-12  9:26   ` Michal Simek
  1 sibling, 0 replies; 11+ messages in thread
From: Michal Simek @ 2020-02-12  9:26 UTC (permalink / raw)
  To: Max Filippov, Michal Simek
  Cc: LKML, Michal Simek, git, Arnd Bergmann, Andrew Morton,
	Stefan Asserhall, Chris Zankel, David S. Miller, Fenghua Yu,
	Geert Uytterhoeven, Helge Deller, Ivan Kokshaysky,
	James E.J. Bottomley, Matt Turner, Rich Felker,
	Richard Henderson, Tony Luck, Yoshinori Sato,
	open list:ALPHA PORT, open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

On 12. 02. 20 10:23, Max Filippov wrote:
> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> Generated files are also checked by sparse that's why add newline
>> to remove sparse (C=1) warning.
>>
>> The issue was found on Microblaze and reported like this:
>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
>> warning: no newline at end of file
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
>> ---
>>
>> Changes in v2:
>> - Update also others archs not just microblaze - Arnd
>> - Align subject and description to match multiarch chagne
>>
>>  arch/alpha/kernel/syscalls/syscallhdr.sh      | 1 +
>>  arch/ia64/kernel/syscalls/syscallhdr.sh       | 1 +
>>  arch/m68k/kernel/syscalls/syscallhdr.sh       | 1 +
>>  arch/microblaze/kernel/syscalls/syscallhdr.sh | 1 +
>>  arch/parisc/kernel/syscalls/syscallhdr.sh     | 1 +
>>  arch/sh/kernel/syscalls/syscallhdr.sh         | 1 +
>>  arch/sparc/kernel/syscalls/syscallhdr.sh      | 1 +
>>  arch/xtensa/kernel/syscalls/syscallhdr.sh     | 1 +
>>  8 files changed, 8 insertions(+)
> 
> For xtensa:
> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
> 
> ...
> 
>> diff --git a/arch/m68k/kernel/syscalls/syscallhdr.sh b/arch/m68k/kernel/syscalls/syscallhdr.sh
>> index 6f357d68ef44..8ac15be01ac2 100644
>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>>         printf "#endif\n"
>>         printf "\n"
>>         printf "#endif /* %s */\n" "${fileguard}"
> 
> Here there's already \n at the end, so no need for another one?

No it is not needed. But I think that make sense to have the same
solution in all these scripts. Above printf is adding newline that's why
I have used the same style.

M


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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:25   ` Geert Uytterhoeven
@ 2020-02-12  9:27     ` Michal Simek
  2020-02-12  9:32       ` Geert Uytterhoeven
  0 siblings, 1 reply; 11+ messages in thread
From: Michal Simek @ 2020-02-12  9:27 UTC (permalink / raw)
  To: Geert Uytterhoeven, Max Filippov
  Cc: Michal Simek, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> Hi Max,
> 
> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>>
>>> Generated files are also checked by sparse that's why add newline
>>> to remove sparse (C=1) warning.
>>>
>>> The issue was found on Microblaze and reported like this:
>>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
>>> warning: no newline at end of file
>>>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
> 
>>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
>>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
>>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>>>         printf "#endif\n"
>>>         printf "\n"
>>>         printf "#endif /* %s */\n" "${fileguard}"
>>
>> Here there's already \n at the end, so no need for another one?
> 
> Thanks! I completely missed that.
> So I did fix the original while applying ;-)

I can drop m68k or align with with others. I would prefer to have the
same solution in all these scripts.

Thanks,
Michal

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:27     ` Michal Simek
@ 2020-02-12  9:32       ` Geert Uytterhoeven
  2020-02-12  9:37         ` Michal Simek
  0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12  9:32 UTC (permalink / raw)
  To: Michal Simek
  Cc: Max Filippov, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

Hi Michal,

On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >>>
> >>> Generated files are also checked by sparse that's why add newline
> >>> to remove sparse (C=1) warning.
> >>>
> >>> The issue was found on Microblaze and reported like this:
> >>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> >>> warning: no newline at end of file
> >>>
> >>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
> >
> >>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> >>>         printf "#endif\n"
> >>>         printf "\n"
> >>>         printf "#endif /* %s */\n" "${fileguard}"
> >>
> >> Here there's already \n at the end, so no need for another one?
> >
> > Thanks! I completely missed that.
> > So I did fix the original while applying ;-)
>
> I can drop m68k or align with with others. I would prefer to have the
> same solution in all these scripts.

Yeah, it makes sense to align as much as possible.
IIRC, the original plan was to consolidate more later.

Note that all other lines are terminated with a "\n" at the end.
The separate 'printf "\n"' is an extra blank line, not the terminator for the
previous line.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:32       ` Geert Uytterhoeven
@ 2020-02-12  9:37         ` Michal Simek
  2020-02-12  9:40           ` Geert Uytterhoeven
  0 siblings, 1 reply; 11+ messages in thread
From: Michal Simek @ 2020-02-12  9:37 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michal Simek
  Cc: Max Filippov, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> Hi Michal,
> 
> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>>>>
>>>>> Generated files are also checked by sparse that's why add newline
>>>>> to remove sparse (C=1) warning.
>>>>>
>>>>> The issue was found on Microblaze and reported like this:
>>>>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
>>>>> warning: no newline at end of file
>>>>>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
>>>
>>>>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
>>>>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
>>>>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>>>>>         printf "#endif\n"
>>>>>         printf "\n"
>>>>>         printf "#endif /* %s */\n" "${fileguard}"
>>>>
>>>> Here there's already \n at the end, so no need for another one?
>>>
>>> Thanks! I completely missed that.
>>> So I did fix the original while applying ;-)
>>
>> I can drop m68k or align with with others. I would prefer to have the
>> same solution in all these scripts.
> 
> Yeah, it makes sense to align as much as possible.
> IIRC, the original plan was to consolidate more later.
> 
> Note that all other lines are terminated with a "\n" at the end.
> The separate 'printf "\n"' is an extra blank line, not the terminator for the
> previous line.

Should we also get rid of 'printf "\n"' lines or just keep them as they
are today?

M



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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:37         ` Michal Simek
@ 2020-02-12  9:40           ` Geert Uytterhoeven
  2020-02-12  9:42             ` Michal Simek
  0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12  9:40 UTC (permalink / raw)
  To: Michal Simek
  Cc: Max Filippov, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

Hi Michal,

On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <michal.simek@xilinx.com> wrote:
> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> >>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >>>>>
> >>>>> Generated files are also checked by sparse that's why add newline
> >>>>> to remove sparse (C=1) warning.
> >>>>>
> >>>>> The issue was found on Microblaze and reported like this:
> >>>>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> >>>>> warning: no newline at end of file
> >>>>>
> >>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >>>>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
> >>>
> >>>>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>>>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>>>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> >>>>>         printf "#endif\n"
> >>>>>         printf "\n"
> >>>>>         printf "#endif /* %s */\n" "${fileguard}"
> >>>>
> >>>> Here there's already \n at the end, so no need for another one?
> >>>
> >>> Thanks! I completely missed that.
> >>> So I did fix the original while applying ;-)
> >>
> >> I can drop m68k or align with with others. I would prefer to have the
> >> same solution in all these scripts.
> >
> > Yeah, it makes sense to align as much as possible.
> > IIRC, the original plan was to consolidate more later.
> >
> > Note that all other lines are terminated with a "\n" at the end.
> > The separate 'printf "\n"' is an extra blank line, not the terminator for the
> > previous line.
>
> Should we also get rid of 'printf "\n"' lines or just keep them as they
> are today?

Usually there is a blank line above the include guard terminator, so IMHO
it makes sense to have that in generated files, too.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:40           ` Geert Uytterhoeven
@ 2020-02-12  9:42             ` Michal Simek
  2020-02-12  9:57               ` Geert Uytterhoeven
  0 siblings, 1 reply; 11+ messages in thread
From: Michal Simek @ 2020-02-12  9:42 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michal Simek
  Cc: Max Filippov, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

On 12. 02. 20 10:40, Geert Uytterhoeven wrote:
> Hi Michal,
> 
> On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <michal.simek@xilinx.com> wrote:
>> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
>>> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
>>>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
>>>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>>>>>>
>>>>>>> Generated files are also checked by sparse that's why add newline
>>>>>>> to remove sparse (C=1) warning.
>>>>>>>
>>>>>>> The issue was found on Microblaze and reported like this:
>>>>>>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
>>>>>>> warning: no newline at end of file
>>>>>>>
>>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>>>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
>>>>>
>>>>>>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
>>>>>>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
>>>>>>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
>>>>>>>         printf "#endif\n"
>>>>>>>         printf "\n"
>>>>>>>         printf "#endif /* %s */\n" "${fileguard}"
>>>>>>
>>>>>> Here there's already \n at the end, so no need for another one?
>>>>>
>>>>> Thanks! I completely missed that.
>>>>> So I did fix the original while applying ;-)
>>>>
>>>> I can drop m68k or align with with others. I would prefer to have the
>>>> same solution in all these scripts.
>>>
>>> Yeah, it makes sense to align as much as possible.
>>> IIRC, the original plan was to consolidate more later.
>>>
>>> Note that all other lines are terminated with a "\n" at the end.
>>> The separate 'printf "\n"' is an extra blank line, not the terminator for the
>>> previous line.
>>
>> Should we also get rid of 'printf "\n"' lines or just keep them as they
>> are today?
> 
> Usually there is a blank line above the include guard terminator, so IMHO
> it makes sense to have that in generated files, too.

I meant more not to get rid of \n just include them in current prints.
It means like this 'printf "\n#endif /* %s */\n" "${fileguard}"'

M

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

* Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format
  2020-02-12  9:42             ` Michal Simek
@ 2020-02-12  9:57               ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12  9:57 UTC (permalink / raw)
  To: Michal Simek
  Cc: Max Filippov, LKML, Michal Simek, git, Arnd Bergmann,
	Andrew Morton, Stefan Asserhall, Chris Zankel, David S. Miller,
	Fenghua Yu, Helge Deller, Ivan Kokshaysky, James E.J. Bottomley,
	Matt Turner, Rich Felker, Richard Henderson, Tony Luck,
	Yoshinori Sato, open list:ALPHA PORT,
	open list:IA64 (Itanium) PL...,
	open list:M68K ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:SUPERH, open list:TENSILICA XTENSA PORT (xtensa),
	open list:SPARC + UltraSPAR...

Hi Michal,

On Wed, Feb 12, 2020 at 10:42 AM Michal Simek <michal.simek@xilinx.com> wrote:
> On 12. 02. 20 10:40, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> >>> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >>>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> >>>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >>>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <michal.simek@xilinx.com> wrote:
> >>>>>>>
> >>>>>>> Generated files are also checked by sparse that's why add newline
> >>>>>>> to remove sparse (C=1) warning.
> >>>>>>>
> >>>>>>> The issue was found on Microblaze and reported like this:
> >>>>>>> ./arch/microblaze/include/generated/uapi/asm/unistd_32.h:438:45:
> >>>>>>> warning: no newline at end of file
> >>>>>>>
> >>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >>>>>>> Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
> >>>>>
> >>>>>>> --- a/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>>>>>> +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh
> >>>>>>> @@ -33,4 +33,5 @@ grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> >>>>>>>         printf "#endif\n"
> >>>>>>>         printf "\n"
> >>>>>>>         printf "#endif /* %s */\n" "${fileguard}"
> >>>>>>
> >>>>>> Here there's already \n at the end, so no need for another one?
> >>>>>
> >>>>> Thanks! I completely missed that.
> >>>>> So I did fix the original while applying ;-)
> >>>>
> >>>> I can drop m68k or align with with others. I would prefer to have the
> >>>> same solution in all these scripts.
> >>>
> >>> Yeah, it makes sense to align as much as possible.
> >>> IIRC, the original plan was to consolidate more later.
> >>>
> >>> Note that all other lines are terminated with a "\n" at the end.
> >>> The separate 'printf "\n"' is an extra blank line, not the terminator for the
> >>> previous line.
> >>
> >> Should we also get rid of 'printf "\n"' lines or just keep them as they
> >> are today?
> >
> > Usually there is a blank line above the include guard terminator, so IMHO
> > it makes sense to have that in generated files, too.
>
> I meant more not to get rid of \n just include them in current prints.
> It means like this 'printf "\n#endif /* %s */\n" "${fileguard}"'

I think having a "\n" at the start of a string makes the code harder to read.

You could move it to the end of the previous string, but that is not always
possible (e.g. after the loop), so I'd keep the separate prints for blank
lines.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2020-02-12  9:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12  9:16 [PATCH v2] asm-generic: Fix unistd_32.h generation format Michal Simek
2020-02-12  9:23 ` Geert Uytterhoeven
2020-02-12  9:23 ` Max Filippov
2020-02-12  9:25   ` Geert Uytterhoeven
2020-02-12  9:27     ` Michal Simek
2020-02-12  9:32       ` Geert Uytterhoeven
2020-02-12  9:37         ` Michal Simek
2020-02-12  9:40           ` Geert Uytterhoeven
2020-02-12  9:42             ` Michal Simek
2020-02-12  9:57               ` Geert Uytterhoeven
2020-02-12  9:26   ` Michal Simek

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