From patchwork Mon Nov 1 16:34:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 12596661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B27BC433EF for ; Mon, 1 Nov 2021 16:35:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BC6361181 for ; Mon, 1 Nov 2021 16:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232838AbhKAQiS (ORCPT ); Mon, 1 Nov 2021 12:38:18 -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 S232805AbhKAQiP (ORCPT ); Mon, 1 Nov 2021 12:38:15 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BFECC061714; Mon, 1 Nov 2021 09:35:41 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 5so65287363edw.7; Mon, 01 Nov 2021 09:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C1JDx8MgKU4JCNT344IgLl9Cl3PKPBGqorAF6Avl50Y=; b=nSqyXEe9k2xwGuTIFdrOnlKClHxLT4VfcTESz+OeE5J/OZEYzlCLsF/USmyjmHlwFi s5gCv9EwwhakIZ/Gz1ey/SIjBoKw3fxgfoPT7gN4dqXuq2NmCf6z5qO7XOkP601E1OXW voPaY8e0FGUoSLLXlk5itq01OMhJNPAToUOlGFgUUQH49oq51L0O1huTqkHf9oEzBkuE aGLH/YL83KlHAFS/RAqlKjnIJk+UtGok6sd72UJn33ykD7jL2/Y8BDHYbKyu8qpZcyu+ tHun82uAn55ucX4ZjzuThpfkSQyY6b/yjMaN+tvSYkDG7YhTxhi/Pwnwq22VWJiQ8fC0 TxWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C1JDx8MgKU4JCNT344IgLl9Cl3PKPBGqorAF6Avl50Y=; b=m2bTegsG8VDWl1X19QNen4Rr4DogcKBwfJ2DctMmiMz6Xnip8GFmUNjc1FhZ2nARSM vMOQ/g8eqU6WCQdINjaMVm2kp0VDG23ZFJJwe/chsh7uHOdTE95ahr5WL14Dm/kGrnh8 EU+iKex5MKLUyMxLbzNZJiMgig2ZkJJ7Nezq64zcTo3/niny4VRm2blYVC9T8r3BE2Z2 zCLK8ok/UrRt5BcDOsO2582MTLbfZk+afkYc6iiD3tpzsoiLJD5ONHceYp7XWXK/h69W 9fSo9gYbhj9qKdSQ5PCUEX1Kyj9mzfimiCTu+P8v+12RCPWWKIgc91kauZe+4bTx96Dd QxTg== X-Gm-Message-State: AOAM530rN7gRxlSFkemQMapwUmP1CSx/4F3jphV4+l+r70sXB/BgNV/z jRHNOULhUN27VLnh3OWVUxs= X-Google-Smtp-Source: ABdhPJzTY3Qnt4GfhLy3uv8Sl9V59utghnl9eccv0GntrHj0PQqlJHt1ELshiDqCDae7/rM14vz64A== X-Received: by 2002:a17:907:6291:: with SMTP id nd17mr37083612ejc.194.1635784539936; Mon, 01 Nov 2021 09:35:39 -0700 (PDT) Received: from ponky.lan ([2a04:241e:501:3870:f5f:2085:7f25:17c]) by smtp.gmail.com with ESMTPSA id f25sm4124583edv.90.2021.11.01.09.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:35:39 -0700 (PDT) From: Leonard Crestez To: David Ahern , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Eric Dumazet Cc: "David S. Miller" , Herbert Xu , Kuniyuki Iwashima , Hideaki YOSHIFUJI , Jakub Kicinski , Yuchung Cheng , Francesco Ruggeri , Mat Martineau , Christoph Paasch , Ivan Delalande , Priyaranjan Jha , netdev@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 07/25] tcp: Use BIT() for OPTION_* constants Date: Mon, 1 Nov 2021 18:34:42 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Extending these flags using the existing (1 << x) pattern triggers complaints from checkpatch. Instead of ignoring checkpatch modify the existing values to use BIT(x) style in a separate commit. Signed-off-by: Leonard Crestez --- net/ipv4/tcp_output.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 6867e5db3e35..96f16386f50e 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -406,17 +406,17 @@ static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags) static inline bool tcp_urg_mode(const struct tcp_sock *tp) { return tp->snd_una != tp->snd_up; } -#define OPTION_SACK_ADVERTISE (1 << 0) -#define OPTION_TS (1 << 1) -#define OPTION_MD5 (1 << 2) -#define OPTION_WSCALE (1 << 3) -#define OPTION_FAST_OPEN_COOKIE (1 << 8) -#define OPTION_SMC (1 << 9) -#define OPTION_MPTCP (1 << 10) +#define OPTION_SACK_ADVERTISE BIT(0) +#define OPTION_TS BIT(1) +#define OPTION_MD5 BIT(2) +#define OPTION_WSCALE BIT(3) +#define OPTION_FAST_OPEN_COOKIE BIT(8) +#define OPTION_SMC BIT(9) +#define OPTION_MPTCP BIT(10) static void smc_options_write(__be32 *ptr, u16 *options) { #if IS_ENABLED(CONFIG_SMC) if (static_branch_unlikely(&tcp_have_smc)) {