Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5883367ybv; Wed, 12 Feb 2020 01:59:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyjOxxVpMtCsiZHIDz7mbkZjX3j9fO9Nd3KA2XxBE0eiVr87jRI/xDJyBH6kW6hWooc0jrD X-Received: by 2002:aca:fcd4:: with SMTP id a203mr5419277oii.167.1581501553628; Wed, 12 Feb 2020 01:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581501553; cv=none; d=google.com; s=arc-20160816; b=kvpUxIPzB1UFxXFFiaU72i/AWPKK4x5lNERxmce1AeQgOVCngg8v9XmhM13zhs7r4s aABFusn7FMJJ2cUGAs1rdiLZccwCoCoJlprcL0SYSncW0YKS8cAtSiPynHU7cEuvvzwQ WOswCGRtSAZBre2yVyWwByRk5BpuaOyMQqPRi51NlG2qxjnQhd8xG4zXnfDnZmC+1GWv hLtDb1DoWbGBvNK/WKNdKiCcx5zQ7l3uXFta1waP+vBTDBlDAr34CtT5j7grsz7eqk07 8FbPufbOHNUH4GUc+zl6Hv4i5J8P6N0NMH1Em/s9ifnlS1SGvcz/kn8AdfGGjQJS4gLc QV8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=eeNTMzOet6YbJZM6KBXk+480ZyC+Oan10p6vM7BqSvg=; b=bnqHrt6dM+R47BqLdYroyz+SgvZgpxpgliEiMU4fPMlPRFOOFtv0x+5DjbyXccpbaw dSAl7okJoDCYfsqWec7RG/lrboZWIirPjM6yDfev1rmaNIxxMd+opXkKzd8cB3NP765h bHHn0QyVKMpmr0QtnDQPSDtVxwFBoYleJRCjzexnarWOEmpLkK7VqiyJVybkVplAqfTF +NFL93jqVHUZdpGFfyLyvlP4wZFS1AI3r5jh9OPvdPnS0mf/TMiAQLqot+Jjt3T/K8GN +PI/9HGv/TXf0khj8JTPy/8pQh3ejSvbYlFatBWcF3GA40GKPlTC3hiMtB67eaBlvzri xmcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si2655701oib.164.2020.02.12.01.59.01; Wed, 12 Feb 2020 01:59:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728947AbgBLJ5w (ORCPT + 99 others); Wed, 12 Feb 2020 04:57:52 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37059 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728745AbgBLJ5w (ORCPT ); Wed, 12 Feb 2020 04:57:52 -0500 Received: by mail-ot1-f68.google.com with SMTP id d3so1326259otp.4; Wed, 12 Feb 2020 01:57:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eeNTMzOet6YbJZM6KBXk+480ZyC+Oan10p6vM7BqSvg=; b=qPr0yf12vizdIR77cFbjmKKStY6ioQTvgEUJY1K5EHi+/67GRD+hgCptLAa4H4OODF DjyCJgoPvYFdfZg7sbDM+oWGFUDbHxO/C1B/kYoY44qfUrYgz3eecVkYnunWpl21eT3p sUHfJnw3g04tzhAHXrcdw79BGpZ2UM4CqgAtyrgk4+tfZquZuVt0vTMxTNhAI5F7WXhQ Jkb5XGvTh7q3MkIvi+QrxADxsXyBLpgPXMsS843rN1CACaayRWP8q2JVTrAJCMzulV8g srFjQEH74c3NkkiWdNfsT+UEvp0m4e5j4UK+2bQOYLlk3Yu59r/rmiQB8X1Dcw6rErko KlSQ== X-Gm-Message-State: APjAAAVikZFq0UOY3GA0PWHFEEc2Jfr7szUtIjGkwAvgLEZepbVF/OY+ nN+YDxfcrUj2iUpjT9fTwVSae//5EgmZ9PQckuc= X-Received: by 2002:a9d:7984:: with SMTP id h4mr8766923otm.297.1581501470937; Wed, 12 Feb 2020 01:57:50 -0800 (PST) MIME-Version: 1.0 References: <6128aa3a-a99c-2ab0-82d1-d5c419e4f5b9@xilinx.com> <1d006656-bd48-0b8e-b893-cddaa5f8f8bc@xilinx.com> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 12 Feb 2020 10:57:39 +0100 Message-ID: Subject: Re: [PATCH v2] asm-generic: Fix unistd_32.h generation format To: Michal Simek Cc: Max Filippov , LKML , Michal Simek , git@xilinx.com, 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..." Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On Wed, Feb 12, 2020 at 10:42 AM Michal Simek wrote: > On 12. 02. 20 10:40, Geert Uytterhoeven wrote: > > On Wed, Feb 12, 2020 at 10:38 AM Michal Simek wrote: > >> On 12. 02. 20 10:32, Geert Uytterhoeven wrote: > >>> On Wed, Feb 12, 2020 at 10:27 AM Michal Simek wrote: > >>>> On 12. 02. 20 10:25, Geert Uytterhoeven wrote: > >>>>> On Wed, Feb 12, 2020 at 10:23 AM Max Filippov wrote: > >>>>>> On Wed, Feb 12, 2020 at 1:16 AM Michal Simek 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 > >>>>>>> Reviewed-by: Stefan Asserhall > >>>>> > >>>>>>> --- 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