Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp536820rdb; Tue, 31 Oct 2023 14:50:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQ+Xjh1LOdatCcBBFtF4GPXXcySJSfftoXUMLSOzJct3DWkkQVhS7vWvKXBsxpc7ZygWE+ X-Received: by 2002:a05:6358:51d8:b0:168:e156:c9b9 with SMTP id 24-20020a05635851d800b00168e156c9b9mr10832414rwl.15.1698789015473; Tue, 31 Oct 2023 14:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698789015; cv=none; d=google.com; s=arc-20160816; b=hDrgNjYihi740zLHorY6YJ4KIwvuFeKHGkWuRXsQ5YBYD7mmmRYC1j4tLlX4nRmslv DHqg8t4N3vCFhStq3csFlCE/hawtKhP4by+jAFX92tQrFtSlhMhMSBbZz9qdYd+R5wme 1mhZhVwe7XwFfWy3khOxX/4PpzusfoYEz8qte/WPAaEKiYpFYZL9kU3zgV0HCmLYbnuL V5qRQ40E4iMDjdick9NejoAFJ+hLhi0M0IVCFw/lFbcfEXpxagdrYFV9wCRazAOKGCNS 2aU1aZppbmwvSWSOlkTJYlSeuY0ZaQK6ICPx8O6n9E65y54+irsAL6kOSfo9YBSpnlcH 5sbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GKyb1hV1vtUSZDqLnTgdX5n0+OXLN+juvNSKnK7I5Q0=; fh=ETM1gFBy57lTXrsdejdPYYODGPP4f3F6WnQZsCNJZmQ=; b=NDShftNEezd8SZN2MNM5Tf+0HbXe0OMKgExYgPX83c6FaO6n6Hm5X39IjPrk1rA6+n xMNskcRklpY2DrtXdpnxriGxjfoSyXRgKuL6IwU7MAwUAYwRJn5/Sk1Q+7jcZo8MT6sg SSmlGEyk+QRgLJOYT0CKSGfUYe1mJ6unbHhz3admBnMaP7S1++3xIVeWaFF+yENluBhp uwfrDz4WZ+2EU96pn7TGTgD+LKZKMnLl8V2RITnksPyo5MJoiSlXPxy68nGMP5CGxTOK fu5ElkWI6L03StDNtYjhj0coWuQe6re0bjuptuQRkgeInd+nzMLuNPlaZIVVs0WVckFo ziFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jL8rQp6H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bg26-20020a056a02011a00b005b95ee3edb4si1654669pgb.621.2023.10.31.14.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 14:50:15 -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=@google.com header.s=20230601 header.b=jL8rQp6H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 90C1D8028A49; Tue, 31 Oct 2023 14:50:12 -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 S1346390AbjJaVuI (ORCPT + 99 others); Tue, 31 Oct 2023 17:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344894AbjJaVuG (ORCPT ); Tue, 31 Oct 2023 17:50:06 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C60E10D for ; Tue, 31 Oct 2023 14:50:04 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32df66c691dso3831049f8f.3 for ; Tue, 31 Oct 2023 14:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698789002; x=1699393802; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GKyb1hV1vtUSZDqLnTgdX5n0+OXLN+juvNSKnK7I5Q0=; b=jL8rQp6Hvy65dLFqx+xznsHESedyRmcvA2n1x0ncCVQdD7MSGLoIfrdq6fHf1KDpmi IuRjwikhb21FUxfCHgo4Lj37v7cGTTNwJ+SEKFIqubZvIOZlIqoctl8l26oeKOJj07G5 EiUqdCVHil2ZiwXiNEtJl3nIxUSS23wpoEA95gnGSSfhp430RDXVT3oY6Zmq28FUZYQM 1m4EwfA9Xs+tCgVqTlVpstM+VBBHpZXondUMBGs6ZWDmm8m2j1GKXJ4vxOCzx5v/X20u qTRghWjifGdpMQtCsETf+nGTKErxBuyNFfEpjsk2/nWS7gt5NMwjis+7ckw41DOrF3LB T6MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698789002; x=1699393802; h=content-transfer-encoding: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=GKyb1hV1vtUSZDqLnTgdX5n0+OXLN+juvNSKnK7I5Q0=; b=Ofs97hYxWbnC5jKKw8ee11LMEDNf2emddFDfl7I5jIEVOuvWJYdApU2FA/jGRnqewZ 4NNsbST7YN/6yGCmFKL2XvoDRVh4qQ0Dv6Kqp0K4oJs2JIYxPZ4SiFP9VCFiC0dkwk2t cNYPz87ixB3V+tbyZA7dTXChKIsh3H78XTBwYjKhhkkFgVhpLm9gZWwZLaZNmsnLlB9O MQ+84vgxzLlECh7HSmhcWPWKNa7Fyv2T0un8JIqn7w6n03egm8BGXe/QuxKaKDipiEsn Lw/e7Nc8tUqImHCDl/VKvLCbCBTF1D8jnfxzSWZZP/biBP0OKvZR/5TS3F856naLTUQX 1hpw== X-Gm-Message-State: AOJu0Yyrt42Pmqlz46zfCwLD8IZgFg1MEvX6VySnKBK07+ophAQFv0gX +NYeTgPClvbay8wMSCm1mTdSbwprrjmFUBILlyTffQ== X-Received: by 2002:a5d:4fc9:0:b0:31f:9b4f:1910 with SMTP id h9-20020a5d4fc9000000b0031f9b4f1910mr9964196wrw.63.1698789002364; Tue, 31 Oct 2023 14:50:02 -0700 (PDT) MIME-Version: 1.0 References: <20231031-tcp-ao-fix-label-in-compound-statement-warning-v1-1-c9731d115f17@kernel.org> In-Reply-To: <20231031-tcp-ao-fix-label-in-compound-statement-warning-v1-1-c9731d115f17@kernel.org> From: Nick Desaulniers Date: Tue, 31 Oct 2023 14:49:51 -0700 Message-ID: Subject: Re: [PATCH net] tcp: Fix -Wc23-extensions in tcp_options_write() To: Nathan Chancellor Cc: edumazet@google.com, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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]); Tue, 31 Oct 2023 14:50:12 -0700 (PDT) On Tue, Oct 31, 2023 at 1:23=E2=80=AFPM Nathan Chancellor wrote: > > Clang warns (or errors with CONFIG_WERROR=3Dy) 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 Well, at least ISO fixed that in C23...I found it annoying. One day we might have nice things. Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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, stru= ct 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-ebd6c9= 978498 > > Best regards, > -- > Nathan Chancellor > --=20 Thanks, ~Nick Desaulniers