Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4596006rwb; Tue, 20 Sep 2022 16:55:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vn9pI7Cd599+9dqO3xJ7AcHG7RNQEeVQNy3hEoCuIL3iZJyQGoxLvSIg30V5i3JEQ9k5i X-Received: by 2002:a17:902:d355:b0:176:cd80:5b32 with SMTP id l21-20020a170902d35500b00176cd805b32mr2091094plk.68.1663718113294; Tue, 20 Sep 2022 16:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663718113; cv=none; d=google.com; s=arc-20160816; b=iyT5mgZjMwM9FDhEXD6IZmXmGTIDOZJVGKJQhX+0zdeMS4IpiULOUAjrAvKd+HnBIZ 0GT8RmBcpXTj2igb6ctQ3K7tZ/vIC0ram8uHsibbhE/h3gqyH+VzdaJM3GXEcuScYW1V 23tA+Mmfq/UdreMT8mAlTRSz8ABmsQvRYbmNz10VQ9ICj/PsJsj1krTx9xVMRpJQoyTx dL0qgPTkzJ730nqUe5CEH95oCY++9eQG59thr43c/xpphcbfXph8JwoXs0Kru/e4QHz4 nh5otUYhMAUe52+gylwA+yRNcaDIXysKDdM5UCMJQrVcayqMWG9nFEBuP+Be6lzriwhm Afcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=+Eud426D9v0zZqJjDUaBctXyXWP8kMK6+I6ZdOHCg4s=; b=TpkA/9fTWnkmH9DX1Nq2yE20HFecZA4r9HeZjZq9G+X4MhjmuPL3FMbenzcySJxy+o xZedTHJrI/V6Ze4k4jzp81pGQNuBFIHE/qh0PtPjP/lA2N+rpuVR+cicVebw6y4DSICh 5LMoojNddxfy+awfUUbeqXqMe+cfA2lQNYbdNO7R3MOzzpvAVWJzy+5y4pv2UCHTcT0C t96FYC3Xls0gCi3x0G8EfwvNq79BNZDSVBQlicrsVdqD7CYhoGx13HJMIF8VVGvFRuZI uNXYbm86ZK1sBWgR7PNMAPVktK/KVGnFyfq9tBKnqq6cPYYmGRRS79RAOUMhbkxjkz80 PCsA== ARC-Authentication-Results: i=1; mx.google.com; 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 t7-20020a170902bc4700b0017889771a05si1069152plz.566.2022.09.20.16.55.01; Tue, 20 Sep 2022 16:55:13 -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; 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 S230368AbiITXl1 (ORCPT + 99 others); Tue, 20 Sep 2022 19:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231468AbiITXlF (ORCPT ); Tue, 20 Sep 2022 19:41:05 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE1EB7C76E; Tue, 20 Sep 2022 16:38:19 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 9DD599200B3; Wed, 21 Sep 2022 01:35:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 9AB3592009B; Wed, 21 Sep 2022 00:35:42 +0100 (BST) Date: Wed, 21 Sep 2022 00:35:42 +0100 (BST) From: "Maciej W. Rozycki" To: Greg Kroah-Hartman , Jiri Slaby cc: Josh Triplett , Anders Blomdell , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v2 3/3] serial: 8250: Switch UART port flags to using BIT_ULL In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 Use BIT_ULL rather than encoding bits explicitly where applicable with UART port flags. This makes a (__force upf_t) cast redundant, but keep it for visual consistency with the flags defined in terms of userspace macros. Signed-off-by: Maciej W. Rozycki --- New change in v2. --- include/linux/serial_core.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) linux-serial-8250-upf-bit-ull.diff Index: linux-macro/include/linux/serial_core.h =================================================================== --- linux-macro.orig/include/linux/serial_core.h +++ linux-macro/include/linux/serial_core.h @@ -505,24 +505,24 @@ struct uart_port { #define UPF_BUGGY_UART ((__force upf_t) ASYNC_BUGGY_UART /* 14 */ ) #define UPF_MAGIC_MULTIPLIER ((__force upf_t) ASYNC_MAGIC_MULTIPLIER /* 16 */ ) -#define UPF_NO_THRE_TEST ((__force upf_t) (1 << 19)) +#define UPF_NO_THRE_TEST ((__force upf_t) BIT_ULL(19)) /* Port has hardware-assisted h/w flow control */ -#define UPF_AUTO_CTS ((__force upf_t) (1 << 20)) -#define UPF_AUTO_RTS ((__force upf_t) (1 << 21)) +#define UPF_AUTO_CTS ((__force upf_t) BIT_ULL(20)) +#define UPF_AUTO_RTS ((__force upf_t) BIT_ULL(21)) #define UPF_HARD_FLOW ((__force upf_t) (UPF_AUTO_CTS | UPF_AUTO_RTS)) /* Port has hardware-assisted s/w flow control */ -#define UPF_SOFT_FLOW ((__force upf_t) (1 << 22)) -#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) -#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) -#define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) -#define UPF_BUG_THRE ((__force upf_t) (1 << 26)) +#define UPF_SOFT_FLOW ((__force upf_t) BIT_ULL(22)) +#define UPF_CONS_FLOW ((__force upf_t) BIT_ULL(23)) +#define UPF_SHARE_IRQ ((__force upf_t) BIT_ULL(24)) +#define UPF_EXAR_EFR ((__force upf_t) BIT_ULL(25)) +#define UPF_BUG_THRE ((__force upf_t) BIT_ULL(26)) /* The exact UART type is known and should not be probed. */ -#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) -#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) -#define UPF_FIXED_PORT ((__force upf_t) (1 << 29)) -#define UPF_DEAD ((__force upf_t) (1 << 30)) -#define UPF_IOREMAP ((__force upf_t) (1 << 31)) -#define UPF_FULL_PROBE ((__force upf_t) (1ULL << 32)) +#define UPF_FIXED_TYPE ((__force upf_t) BIT_ULL(27)) +#define UPF_BOOT_AUTOCONF ((__force upf_t) BIT_ULL(28)) +#define UPF_FIXED_PORT ((__force upf_t) BIT_ULL(29)) +#define UPF_DEAD ((__force upf_t) BIT_ULL(30)) +#define UPF_IOREMAP ((__force upf_t) BIT_ULL(31)) +#define UPF_FULL_PROBE ((__force upf_t) BIT_ULL(32)) #define __UPF_CHANGE_MASK 0x17fff #define UPF_CHANGE_MASK ((__force upf_t) __UPF_CHANGE_MASK)