Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25178393rwd; Sun, 2 Jul 2023 11:57:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQ0bKJfNCmSEPVDpZ6GiivoycOFLuq3rQmqMphE0x+fQ+y1piZil9hDLq3rA8MZkjOHu59 X-Received: by 2002:a05:6a21:32a1:b0:12d:53ad:f55a with SMTP id yt33-20020a056a2132a100b0012d53adf55amr7970785pzb.55.1688324268301; Sun, 02 Jul 2023 11:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688324268; cv=none; d=google.com; s=arc-20160816; b=v73mNMVM7tsVdKREUFatAvVvLQc4GRT+0IrIp0mIOUxcXmpnEbq8+RIwAF7KchPC8i jqdkMAIoG56Mgi30/7Vv+VopiAuboSROWfPqwajGWMdSSX7opQrP5etuF8nZOjEsJoDg d6GXgxk6+WwI0/YJjf7tluhDyY2W/WgjHEYPXkFKRSTpLg1kWoxgqncMFoqYAo6uFja8 RO6iGKZcIDKZlQPCrTuZpJl1mxawmdD8CGKnvQQedtBStPCsSDA+TGPPG1b077BJyw7v hpukV49QtjAnqVLEVbUWG9JkeZz03EzVOK4uDm3njru9pYCru2z95QBsINAFt4gT7S2K x+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CDLfRQeSNoe9NV9A+E5iS8QiPwwVfyDggmBXdLsjCVA=; fh=5Q8QI6WNR7p/0THTqj1PEFDsdN5oaVk4zWg9deckm6o=; b=pA0aA8qEGDT1bke2FYcc4pPM//3NlnTswfp80uP5LVxlxlttRGuKJ6m3ccyG4TNaM4 pB6Oz/tiQbknFoWJInT4VCgpKxGdr5qKwpOihxo1kFNKKFBA+ad6pGB+xXn4B99pTI2F lwGyMXEXbXjH4KdowuqpNQql4OtkD1thag7Ee3tQIGxBvpnZR7byi3ENHq7hAQujbBYx Ff6dBucfe/k8DIULPw2BcamVby9rxOQiCgl3p/Eu/3Whpag3XkYEmLJCgMSq060l+xcE yEFpGWO1wdwc3K/a8hjfsFOl+7yFfFD3pIUjopvKUdJ+rVR+1IaTiV9whD8r4Kky9lav R+pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020a635a5a000000b00543cca81bb9si16661787pgm.329.2023.07.02.11.57.35; Sun, 02 Jul 2023 11:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229776AbjGBSpM (ORCPT + 99 others); Sun, 2 Jul 2023 14:45:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjGBSpL (ORCPT ); Sun, 2 Jul 2023 14:45:11 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D4CEC5; Sun, 2 Jul 2023 11:45:08 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 362IirQm017346; Sun, 2 Jul 2023 20:44:53 +0200 Date: Sun, 2 Jul 2023 20:44:53 +0200 From: Willy Tarreau To: Zhangjin Wu Cc: thomas@t-8ch.de, arnd@arndb.de, david.laight@aculab.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v5 06/14] tools/nolibc: arch-*.h: clean up multiple whitespaces Message-ID: <20230702184453.GF16233@1wt.eu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zhangjin, On Wed, Jun 28, 2023 at 09:19:33PM +0800, Zhangjin Wu wrote: > To align with Linux code style and let scripts/checkpatch.pl happy, the > multiple whitespaces in arch-.h files are cleaned up. > > Most of them are modified by these commands automatically: > > $ sed -i -e '/#define my_syscall/,/})/{s/ /\t/g}' tools/include/nolibc/arch-*.h > $ sed -i -e '/#define my_syscall/,/})/{s/ *\\$/\t\\/g}' tools/include/nolibc/arch-*.h > > And checked with: > > $ grep ' *\\$' tools/include/nolibc/arch-*.h I'm surprised by this one, I never saw checkpatch complain here. For me, putting a tab after a non-tab is an error. It makes the code harder to edit and re-align, and diffs are harder to read on lines whose lengths varies by +/-1 around a multiple of 8 as it makes the post-tab stuff zigzag. You made me recheck the coding style file, and there's nothing about alignment there, only about indent (and indent uses tabs here). There are also other parts which use spaces for alignment (albeit not that many), so unless there is a solid reason for changing that, I'd rather not do it, as for me it's the exact opposite of a cleanup as it will cause me quite some discomfort. > Besides, more multiple whitespaces are cleaned up: > > - convert "__asm__ volatile" to "__asm__ volatile" I totally agree on this one, it's very likely the result of a mechanical change. > - "foo _num bar" should be "foo _num bar" In theory yes, except that for those where it appears it was only to keep all declarations aligned given that this _num was shorter by one char than all other local names. Especially when it comes to enumerating register names, you definitely want to keep them aligned. It's sufficiently difficult to avoid mistakes there, any help for visual check counts. Willy