Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1721915pxj; Wed, 19 May 2021 12:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwloYUaEqFnyaO05ETCI9gH126nUem2LuEEXOdr6BXs9+CNhV8aeRUpTrLukrlS0TEiEwTS X-Received: by 2002:aa7:d844:: with SMTP id f4mr599513eds.203.1621451964237; Wed, 19 May 2021 12:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621451964; cv=none; d=google.com; s=arc-20160816; b=pf2tgOILbjeh8Wt/1F0HVqU0lSb3AXOABdELTYJTb9jAkexPoiegLkekwrRdLt5AtI 8muXP2jYZqrPWERhUa0Pc5MAaZeC8iuTbwtIXDnadfXnCKqPB4gj9JioVjyNuHqiLhFm o4BmDhzCG9aC+kvLvochCUa3AkErJnt7bARMkTksPDhJyYRvnxBGDfFOsCFXgV9IWZhu w8PO/j56uLkIXLVSjZDrnvVwM6kxAj/ZHipkTbYAQwwzk4/W0s8eKxi2r5+aq9pOnnKN tIBYnbv73FST2DkATTe3K5hr9Lge4kZqy7PAH27dJovKQIx6hoKhs/CjcfmPBhLYTvdh moUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=eM8EQdorm7mWG5o19XHqVGANwvQx7NCTQwR5Sava/sg=; b=j855nBU5jZqFOZwgRMqBWnb97wKb7o+WKYE2/j3nMBaWlPZ9ug9uQqMO+PBPdV3/11 nQqduilNrMtSh4Ko9UJPwgAQ8b+hU6d5eXpI5vzf/l8fDjt/n3Q5OSdidega4dPBYa6d rr3O/3kelcB+kzObnMZuGl0lJymfIXDsfwGuJrveI5TAm9KHpqzru7V6XyNLRJ2LXaHw I1lVAtatvth3UEpw1TzvYkR6qmXvvsCPOlsjqaKVcpiwKpRJG1dhHEMjTyD4AKjj+PEa o576U1QkltQwWRkQGYFqpuu3ZZ+JcpWb7hyerD8vQ08dplelxwdOx5uujZa5V2Buz0xg /wSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si419650ejc.303.2021.05.19.12.18.59; Wed, 19 May 2021 12:19:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234280AbhESGPk (ORCPT + 99 others); Wed, 19 May 2021 02:15:40 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:40783 "EHLO mail-wr1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbhESGPh (ORCPT ); Wed, 19 May 2021 02:15:37 -0400 Received: by mail-wr1-f45.google.com with SMTP id z17so12614173wrq.7; Tue, 18 May 2021 23:14:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eM8EQdorm7mWG5o19XHqVGANwvQx7NCTQwR5Sava/sg=; b=RM4jwaeYbBUIgNQDlRxeqj0JO9OTU+py8tLHT5SdBYgIsVfsKiRp5xWEKnbtsCllar EsRVpzhKWtjX8ozcjMSp3eRltO1nUK17pKwEuzS5g7Vur8w75f5EpDzWy269+s77Y0qr Omr6bzGkFiwd/n3i0HcYowdjkvIdbs4P90a2iZbdBkfqh6fz4Hzkc0t5Xpv8o60YX1WI WDIrTZtkJTyIDmZsV/oPg92nKfbWixfUwSG6RtuDwYHEnIG527HVA6Ahe0IV61prULXT H4E92ZAd5Zp+7A6lo/ypYcsGZe2lMVN5EGISRvRr1iGEAbeoJ+LjPfi6Q+910po81sZE 7VOg== X-Gm-Message-State: AOAM533BvLlyey/kSa8gYPD7I2W5NC8ER0sL9Mrb9WABsykXD8CMgjPH TJjh7HevO4nyjhj/Yah3URw= X-Received: by 2002:adf:f9ce:: with SMTP id w14mr12479031wrr.387.1621404857559; Tue, 18 May 2021 23:14:17 -0700 (PDT) Received: from ?IPv6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id i1sm13181697wrp.51.2021.05.18.23.14.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 May 2021 23:14:17 -0700 (PDT) Subject: Re: [PATCH v2 2/2] serial: 8250: Use BIT(x) for UART_{CAP,BUG}_* To: Andrew Jeffery , linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, joel@jms.id.au, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, jenmin_yuan@aspeedtech.com, ryan_chen@aspeedtech.com, miltonm@us.ibm.com References: <20210519000704.3661773-1-andrew@aj.id.au> <20210519000704.3661773-3-andrew@aj.id.au> From: Jiri Slaby Message-ID: <56ec152a-560b-1eed-97e2-c12e4fed171a@kernel.org> Date: Wed, 19 May 2021 08:14:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210519000704.3661773-3-andrew@aj.id.au> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19. 05. 21, 2:07, Andrew Jeffery wrote: > BIT(x) improves readability and safety with respect to shifts. > > Signed-off-by: Andrew Jeffery > --- > drivers/tty/serial/8250/8250.h | 33 +++++++++++++++++---------------- > 1 file changed, 17 insertions(+), 16 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h > index 34aa2714f3c9..4fbf1088fad8 100644 > --- a/drivers/tty/serial/8250/8250.h > +++ b/drivers/tty/serial/8250/8250.h > @@ -7,6 +7,7 @@ > * Copyright (C) 2001 Russell King. > */ > > +#include > #include > #include > #include > @@ -70,25 +71,25 @@ struct serial8250_config { > unsigned int flags; > }; > > -#define UART_CAP_FIFO (1 << 8) /* UART has FIFO */ > -#define UART_CAP_EFR (1 << 9) /* UART has EFR */ > -#define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */ > -#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */ > -#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */ > -#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */ > -#define UART_CAP_HFIFO (1 << 14) /* UART has a "hidden" FIFO */ > -#define UART_CAP_RPM (1 << 15) /* Runtime PM is active while idle */ > -#define UART_CAP_IRDA (1 << 16) /* UART supports IrDA line discipline */ > -#define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks: > +#define UART_CAP_FIFO BIT(8) /* UART has FIFO */ > +#define UART_CAP_EFR BIT(9) /* UART has EFR */ > +#define UART_CAP_SLEEP BIT(10) /* UART has IER sleep */ Perfect, except the include: BIT is not defined in bitops.h, but in bits.h (which includes vdso/bits.h). In fact, bitops.h includes bits.h too, but it's superfluous to include all those bitops. thanks, -- -- js suse labs