Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp320858rdf; Fri, 3 Nov 2023 01:22:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IES6Rv3ElnkDRwsYCIK00MHMuOFpuukiP2NIDWO8tigtiZHx6h2OzdbwiKF5RNmJ5YSB6ct X-Received: by 2002:a05:6358:6f9a:b0:168:e843:9000 with SMTP id s26-20020a0563586f9a00b00168e8439000mr23344432rwn.26.1698999761160; Fri, 03 Nov 2023 01:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698999761; cv=none; d=google.com; s=arc-20160816; b=wlxWBovm27KzA/LlNfcvsMf3Rfny9zqwuZVoZBXiVebm5EAHkUlUsqlaElZu8hE45v 37NV6iDr5rBbmK3aODKwvA0S5PCkquyMQhQMqJwP1Ad/lZw4Wmajz3fJxZrccfMwNPWK Tc4e5S6Y8nnVpw+ukYrpkhGjDsnYWUv1XxriQE9nfOzB8uq1c39DzxhRhpQq1uGjZp9A nfqWJkyuKh5HdFc3wdRsLQd3E4v4fISfN5WxZ3+TUrttv8nktaZjwHJFlGih58FTP3Uq S/8dIeQS75bRx0yJVieTT4l6MAWlx5cOBqlCJ90gjublqx1QsnpgMHFKjT4CEMQ+TNaa nEjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EPKbN/fAcNBie4nAiJk8hvrFfMadPTWNEWxizjzYh/k=; fh=aZyc06zKS3psCuLTJJwP/XmR6tRy9rlr82iQafQXfkk=; b=bRwjw48jbmnAF6uM4VEcWbE3lSZCDMhAgsFiDG9ihvka0RkyDdPCN17tmHQU76XEI6 gVPAZQfoEMDykC6iMQCaIJJmmcg1wPCUeq/Zp5nupzeVg9pWpoutvJ0h23vUICu2tH5e nypWb/43zo+D7GA7/5uZe4P+yukvfbghdUT1wisgKDlaH7XKZV2O2fLouL8YmM4r4s1H 4fn0IXM+CEQYc3Mof9DrP6T20TvcbfzfAGCwbmB7Q4NcF+7SR2aRMlT2JVSufTG4Nrbl ruCvPb3oigWHIs8sSToeeUVvEDsw5CsN6KkiRLkQq/49ET2SBXodo35J9DjvuS3A9/e3 ynDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nNNyOoFx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bj25-20020a056a02019900b005a9b2800a08si1184005pgb.783.2023.11.03.01.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 01:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nNNyOoFx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4B2B582554BB; Fri, 3 Nov 2023 01:22:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235761AbjKCIWU (ORCPT + 99 others); Fri, 3 Nov 2023 04:22:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235607AbjKCIWT (ORCPT ); Fri, 3 Nov 2023 04:22:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12B4123; Fri, 3 Nov 2023 01:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EPKbN/fAcNBie4nAiJk8hvrFfMadPTWNEWxizjzYh/k=; b=nNNyOoFxo0uwwVvNH/wBj6zyxi AAmkgPQPchCj3Moaubf3St2OGjUZ57ikTinRRjirtZGFU4gjc2/lXJ/sMLpSWhyq6Xd9vFgj370K7 nWATYHpJlFWLlX4oYvz6APkQi38bApywqw116dvcerAEuqtGxAX4vMIlEjH9TUc9oclP+jENuvh8H rxbsnDBlCBtYqw9s4g8nNkJRsLhrFwzmllYGoYaFEHfsMWs5Ckn1fL7gaMyU084ZZgoWfoKO6Ue2X FfugdaZCdHPS5/wlzaIeM4cjoKzc46QMKLvKz8f6A3VqNBDq1iVgTvkoMnq5eUEdAv7gUi6xDFCKD ScKIZBag==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qypRN-00AyPo-38; Fri, 03 Nov 2023 08:22:05 +0000 Date: Fri, 3 Nov 2023 01:22:05 -0700 From: Christoph Hellwig To: Nathan Chancellor Cc: edumazet@google.com, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, ndesaulniers@google.com, trix@redhat.com, 0x7f454c46@gmail.com, fruggeri@arista.com, noureddine@arista.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH net] tcp: Fix -Wc23-extensions in tcp_options_write() Message-ID: References: <20231031-tcp-ao-fix-label-in-compound-statement-warning-v1-1-c9731d115f17@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231031-tcp-ao-fix-label-in-compound-statement-warning-v1-1-c9731d115f17@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 01:22:36 -0700 (PDT) On Tue, Oct 31, 2023 at 01:23:35PM -0700, Nathan Chancellor wrote: > Clang warns (or errors with CONFIG_WERROR=y) when CONFIG_TCP_AO is set: > > net/ipv4/tcp_output.c:663:2: error: label at end of compound statement is a C23 extension [-Werror,-Wc23-extensions] > 663 | } > | ^ > 1 error generated. > > On earlier releases (such as clang-11, the current minimum supported > version for building the kernel) that do not support C23, this was a > hard error unconditionally: > > net/ipv4/tcp_output.c:663:2: error: expected statement > } > ^ > 1 error generated. > > Add a semicolon after the label to create an empty statement, which > resolves the warning or error for all compilers. Can you please just split the A0 handlig into a separate helper, which shuld make the whole thing a lot cleaner?