Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp499064rdb; Tue, 31 Oct 2023 13:24:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzF8grA88wM9RgyPiH3oK0oeLI0FJK9C6+51LjRhIzLvE8DDkx6pHI9Bcz1dH4NzAl5seP X-Received: by 2002:a17:902:c94d:b0:1cc:4e78:d10f with SMTP id i13-20020a170902c94d00b001cc4e78d10fmr6763307pla.8.1698783842488; Tue, 31 Oct 2023 13:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698783842; cv=none; d=google.com; s=arc-20160816; b=cW75xk2SFaJRjMJdlYv41Vgv2GYpYUctjUg7CxfEy2FYVb1CcddXakdf31Rk4mcMuf JR5r2jxVph9c94lYHuK/7n0+r17V/2eSqULWS2ZL62n26Kdjsjk+n7ctfviXVsgld2uc zg9D9QtOexVXP3iCB8qWMQ4C5zN4LQ0Q1bB0g9gouBRNWvHjTSqYsPXJP5Ya+bgIYxR6 KSZkETdB/n8R1kyhCXid2+Xusux5ZqfnK59eTYXY9/QPtw61gtKfjZ75wZMPyeg3W9oZ MDdv7MWB0vrrdIojGkX00K5M7DGzdTKX1QcDXlaDHss3zfO4W7buS0wOY2S/gwd/FPuD jc+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=NJm8ySIVVI9tPmD/qB3yb7zWZwvvPAkZVKRd2d3sChk=; fh=9VlQ/s34u/1qhRhYjjxdZ+zGVKtx+L2UiBNZtI3IXpA=; b=dowH7r2BOocaxbiiFsaK4I6ipMYCf2W1oaRMNLZl51JQNV8F8PW/HBj5SzXM4TlG/p +hSOR3lYF4Hq3ItRfco+1sOaJKTL9CH8BJnzBSGYp1XYt0rq8kpDSZ/X/AzTUYvekJ7X 4ABomuEqqjfgnH7Ankgb6IZRNTUR6jUbb1GYeMqpHLY4lRbuH2PXU5ICBfOOfyqRor0o w2FsYzcHdYg5WJFKnkSgU9hFzihLYxw/lftWuDePED99sU1xcyJ0SjZMker6CH5oYEl6 8alnyCy9xMg6CnMYqHuPTxEtDa12OB559GiCt0dL9p4IcsvhRpbJucZ2ME8uEX2LYxjB XxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s5sH2Uci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id li14-20020a170903294e00b001cc0d5d8102si1412605plb.221.2023.10.31.13.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 13:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s5sH2Uci; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 70A598104390; Tue, 31 Oct 2023 13:24:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233491AbjJaUX5 (ORCPT + 99 others); Tue, 31 Oct 2023 16:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234097AbjJaUX4 (ORCPT ); Tue, 31 Oct 2023 16:23:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF8C10A for ; Tue, 31 Oct 2023 13:23:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC330C433C7; Tue, 31 Oct 2023 20:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698783833; bh=kWiaXu3zrQZh2hYqfEmW4X7fxyTTU9Vm8/7Xl0jbDBA=; h=From:Date:Subject:To:Cc:From; b=s5sH2Uci1k2u4vWV23OrrzgnwwQKx+y5oaE0RpqzJ6Twf7lV29B/bkx2x9CbcHhgn Hfd01CAIq4EtfvIWkc1Z1uGI+U2bw5mIEmczPNeG9ThqFF59TgRArd+ZG48aTt/xQO 8YhKl5stfQntyVPcWA/n+sG96SC7KQ+v4r6KyyjP65sVayY4vxc7OtPoNZZG33e5Rq seCYRCmchOws3UuX2GEynHkpSlssIUm2Xt5uwMQyf8S/Ad1tvFFudq5lDlcboCi0+T YEbawG7N7XeSujIVQIduOldpcybF3VriG1dlAyZU6iS+kx1M2qvC6MmTR7NSgZBFbt Eex9Tbeiqjthg== From: Nathan Chancellor Date: Tue, 31 Oct 2023 13:23:35 -0700 Subject: [PATCH net] tcp: Fix -Wc23-extensions in tcp_options_write() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231031-tcp-ao-fix-label-in-compound-statement-warning-v1-1-c9731d115f17@kernel.org> X-B4-Tracking: v=1; b=H4sIAEdiQWUC/x2NywqDMBAAf0X23AWjxZr+SvGwJlu7oJuQpA8Q/ 73B4xxmZofMSTjDvdkh8UeyBK1gLg24F+nCKL4ydG3Xm7Y3WFxECviUH64084qi6MIWw1s95kK FN9aCX0oquiDPfnDW3sarHaFGY+KqnsMHKBeYjuMPgHtvwIUAAAA= To: edumazet@google.com, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com Cc: 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, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1514; i=nathan@kernel.org; h=from:subject:message-id; bh=kWiaXu3zrQZh2hYqfEmW4X7fxyTTU9Vm8/7Xl0jbDBA=; b=owGbwMvMwCEmm602sfCA1DTG02pJDKmOSREXvu1tr+8+bHVSuOeh38onXBunXjs4y4cn7rHcg Za26s9POkpZGMQ4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBErl9gZNh04/vrW5sNPmfM aXzGUKT2ZEVGzo5L0ccv7ubqSViXlHqUkWGt9YUSyxlBEl+f7VFIuhPVxS8b+8PzTKPVTYYTk// lC/ADAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 13:24:01 -0700 (PDT) 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. Closes: https://github.com/ClangBuiltLinux/linux/issues/1953 Fixes: 1e03d32bea8e ("net/tcp: Add TCP-AO sign to outgoing packets") Signed-off-by: Nathan Chancellor --- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f558c054cf6e..6064895daece 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -658,7 +658,7 @@ static void tcp_options_write(struct tcphdr *th, struct tcp_sock *tp, memset(ptr, TCPOPT_NOP, sizeof(*ptr)); ptr++; } -out_ao: +out_ao:; #endif } if (unlikely(opts->mss)) { --- base-commit: 55c900477f5b3897d9038446f72a281cae0efd86 change-id: 20231031-tcp-ao-fix-label-in-compound-statement-warning-ebd6c9978498 Best regards, -- Nathan Chancellor