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 <[email protected]>
Reviewed-by: Stefan Asserhall <[email protected]>
---
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
Hi Michal,
On Wed, Feb 12, 2020 at 10:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> Reviewed-by: Stefan Asserhall <[email protected]>
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 <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> Reviewed-by: Stefan Asserhall <[email protected]>
> ---
>
> 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 <[email protected]>
...
> 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
Hi Max,
On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> > Reviewed-by: Stefan Asserhall <[email protected]>
> > --- 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 -- [email protected]
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
On 12. 02. 20 10:23, Max Filippov wrote:
> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
>> Reviewed-by: Stefan Asserhall <[email protected]>
>> ---
>>
>> 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 <[email protected]>
>
> ...
>
>> 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
On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> Hi Max,
>
> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
>>> Reviewed-by: Stefan Asserhall <[email protected]>
>
>>> --- 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
Hi Michal,
On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <[email protected]> wrote:
> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
> >> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> >>> Reviewed-by: Stefan Asserhall <[email protected]>
> >
> >>> --- 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 -- [email protected]
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
On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> Hi Michal,
>
> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <[email protected]> wrote:
>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
>>>>> Reviewed-by: Stefan Asserhall <[email protected]>
>>>
>>>>> --- 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
Hi Michal,
On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <[email protected]> wrote:
> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <[email protected]> wrote:
> >> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> >>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
> >>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> >>>>> Reviewed-by: Stefan Asserhall <[email protected]>
> >>>
> >>>>> --- 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 -- [email protected]
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
On 12. 02. 20 10:40, Geert Uytterhoeven wrote:
> Hi Michal,
>
> On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <[email protected]> wrote:
>> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
>>> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <[email protected]> wrote:
>>>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
>>>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
>>>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
>>>>>>> Reviewed-by: Stefan Asserhall <[email protected]>
>>>>>
>>>>>>> --- 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
Hi Michal,
On Wed, Feb 12, 2020 at 10:42 AM Michal Simek <[email protected]> wrote:
> On 12. 02. 20 10:40, Geert Uytterhoeven wrote:
> > On Wed, Feb 12, 2020 at 10:38 AM Michal Simek <[email protected]> wrote:
> >> On 12. 02. 20 10:32, Geert Uytterhoeven wrote:
> >>> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek <[email protected]> wrote:
> >>>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote:
> >>>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov <[email protected]> wrote:
> >>>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek <[email protected]> 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 <[email protected]>
> >>>>>>> Reviewed-by: Stefan Asserhall <[email protected]>
> >>>>>
> >>>>>>> --- 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 -- [email protected]
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