Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2972887rwi; Fri, 28 Oct 2022 13:57:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM44Y/gsxTcFdezGyQ4BeqFKSVDvtmvbNuRtA5SYaaB33aL2/PSiocNpyJwhleW1cfq/gxjO X-Received: by 2002:a17:902:d490:b0:186:c544:8ac7 with SMTP id c16-20020a170902d49000b00186c5448ac7mr916979plg.158.1666990636822; Fri, 28 Oct 2022 13:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666990636; cv=none; d=google.com; s=arc-20160816; b=Afs+SYmSm9R5R+pBeJx3UExW/n8OjNAR6AUu5uP89E2VdlmCME4aWFiPpN95eie8+R pQmNWvxMQyCtURRlxdHVUyNXvqPxCVNOidT5ZY/4WizW3C+0tDxVHh0y8dwY+SYn2IC1 nOV7xsWW/y1XexnUDfbtf2HGm1Jl2s1vZrOqb0J8TrQ//Isma2TpaUnqV63c3WQNa6YF IUpbyi90NA5TRro7c7d1OAYJ6cjqMh9zENczd2RfoZwzwBRi8dZ80afL8d0k6W6Y5l0y utOKhbCA4wVak9Lw9GdA4h5WQmAiFHcmy9/xo5jTuhyTS+B3cg5oWDb65BBDo8+TEV/S zz6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=B/0q7x7+qjN99OJ/2oEOEybhUKk96jVS5LgZ/DYyGqM=; b=NpukjtbUsLRkisRtOiUwwvoV7mXma5VPb4FdyVsiFA09Pi5keeWLgwBvjwVh7XSvJm XsylGfTMnWcWKXrKyn0V8Sz/yY+X6Vqhi335iiQE2ITWmKWViJiQe6rZqPGqVbyo0lZm DFiIFPTUjZiOx9A3QU/qydP0gEdPf4OQ2haKiRyqI4nT/QgR3QEcYCaHiL/7Z5XtXKk0 bmDP6UMp0xaBhJr5qYmIsq+JoSHb5Dgd5yqQwUTa/HaIU2913FWRAGAiWv8gj17bl0zx oTDVLvnfv//sun2LWRJXPoWbDCY1cUP8KxeFKM7LxcMy8ny/h7qUsCQebesUhrecmaal t9+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HZQaVEg7; 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 3-20020a630603000000b00457dc916cd8si6708917pgg.152.2022.10.28.13.57.05; Fri, 28 Oct 2022 13:57:16 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HZQaVEg7; 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 S229777AbiJ1U3b (ORCPT + 99 others); Fri, 28 Oct 2022 16:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiJ1U32 (ORCPT ); Fri, 28 Oct 2022 16:29:28 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96784B877 for ; Fri, 28 Oct 2022 13:29:27 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id x13so4817083qvn.6 for ; Fri, 28 Oct 2022 13:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=B/0q7x7+qjN99OJ/2oEOEybhUKk96jVS5LgZ/DYyGqM=; b=HZQaVEg7A3nWhTltLxXM1tqni+i4mHJRSmqM4zwQct4rXvc7HT6MFXXcVOYaQO6GSp pxy+IS83Qi1hWhPdE+ClDKzIf6qzYLHLf8A2k8vDrk67lfegdeJHwDQ4HQ5c61N/eeJD Jnfm4sYHegcxjMwzvjUz684rUfJcR2W63g1uM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B/0q7x7+qjN99OJ/2oEOEybhUKk96jVS5LgZ/DYyGqM=; b=dcbQRPmigMF19oTrri2VWaof/mnugQORSM53d6uwibnThslSLF7pU6q9LAdEhmBn4F Jauzwwo7DMK7bCuqCUKq3xpganoNnuPqJVqVUyyeezw2H4ktzPGhIiPjJmfeErjjL7e3 cAeabIgB4VWGDR3KrAjgDLbfBzU3JozZGhtrHNn2JoTa7O0Vabq0gkoiVX+6IAmpXgRy fuYJ4gq0sNuBE82IyKbcVgNb7g9SuLGyFTCLNrlzWDSBBhSpVndU96XF44f6Hrjzlna6 QELA10Z4UxXv303Mf+9PWRFKsuHEq4BGewNo7g7cIKLTbKOhmooQx2HuGoEm4qB096oR Ht0w== X-Gm-Message-State: ACrzQf2ICoQWC+Q4D9aYbOxdEKuKUjNEP9fm54AlhFtxt9iMi4o5d4tR q+6sHpLpFMR0WCoHRSAe7t1ekoGCIhFisg== X-Received: by 2002:a05:6214:20aa:b0:4bb:7e1a:9df0 with SMTP id 10-20020a05621420aa00b004bb7e1a9df0mr1131246qvd.34.1666988966480; Fri, 28 Oct 2022 13:29:26 -0700 (PDT) Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com. [209.85.128.169]) by smtp.gmail.com with ESMTPSA id bq8-20020a05620a468800b006ee77f1ecc3sm3637244qkb.31.2022.10.28.13.29.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 13:29:25 -0700 (PDT) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-35befab86a4so57366977b3.8 for ; Fri, 28 Oct 2022 13:29:24 -0700 (PDT) X-Received: by 2002:a81:555:0:b0:36b:2d71:5861 with SMTP id 82-20020a810555000000b0036b2d715861mr1254502ywf.340.1666988964567; Fri, 28 Oct 2022 13:29:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Fri, 28 Oct 2022 13:29:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: drop -Wdeclaration-after-statement To: Alexey Dobriyan Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, rafael.j.wysocki@intel.com, masahiroy@kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Fri, Oct 28, 2022 at 1:00 PM Alexey Dobriyan wrote: > > Putting declarations in the beginning of the block is an afterfact from > single pass compiler era. Compiler would parse all declarations, layout > stack frame and proceed to generate code. No, putting declarations at the beginning is still kernel syntax. Don't declare variables in multiple places. It gets really confusing. Put all declarations at the top of the block they are contained in. IOW, -Wdeclaration-after-statement does exactly the right thing, and stays. This is not about "old compilers", this is about coding rules. Linus