From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39AB8C433ED for ; Wed, 19 May 2021 06:16:20 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1B23611AD for ; Wed, 19 May 2021 06:16:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1B23611AD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZudGy+VqnKoq0KEpJ+D5jimAtnPhFDmHp930yud9aNg=; b=p1GNdj3cRsyEW4pn3TJeFEf8J omgKyKQyGg1N+T9YD8RikupzBijWQ5ClINP7soVnNq9LJQ7L1mahzrHUk94IXrqTn92ygsred9Lpd /UXpJfShaxCn/4IC03VTbJ0cUbcv8tyaMPWXUpBvjxrNN0O6iwFavOzh+cSvUCvmQBSOoZTHydygj Ho0ZT7gUcSBrbgL2CdPKdo25qEZa2Jcdu6tREAoMQ5rhJZyCJG4PwHz5u73uxIx3xmontPwCZ5Tu5 ocUsdvckzR3dg5EbnjX5krYYDCaN8aG3cv2my1ALsmJT/+DADxP783l3gypTmv4b8UW44SXTMan7R nWrYhl5nQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljFTM-002xWi-Fa; Wed, 19 May 2021 06:14:24 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljFTJ-002xWP-Nf for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 06:14:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=eM8EQdorm7mWG5o19XHqVGANwvQx7NCTQwR5Sava/sg=; b=L4KD/GCsPxeuxH0jEaJangD33W HkMILhGut0FGuKnXfSZ4VkcXglZ4VdSSOS0FUuD96p0lxLmdp2cV5gjSDXzzp5NGQbFPXiBmWgAdV wxOODjmdhdRY5o9ci5RsoKuQccAa5EVnsjdw/9dbYoySRHYKQYw/03cwzdAF1x+a3JYK04zE2vXPI 3JVlYh+xHCoiwoQmYwFYZV2BkTZ/7ce6T/55dZn/DYKR2uwAaRAs5sfDnJrYbdR9h5QYS6ho2W1/v 7lLhie+OqpnpJWqoEG0+8IQuI6msadLC5zrqgIzqSKBqyAdJsy3bXqhst7UHcRtOusIT8wMb5k7uV iSapwLvQ==; Received: from mail-wr1-f46.google.com ([209.85.221.46]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljFTH-00FAqw-9K for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 06:14:20 +0000 Received: by mail-wr1-f46.google.com with SMTP id a4so12670568wrr.2 for ; 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=jYlcqglZPfGXW+3CxzlJJUl3ppwQ+WNE6kYciLjwlx2f6MaWG6od6bG4wbs3HwnWu4 lH8o21tL9r1emxfPiNhyguCytowBIWb59zN3cOcSDgMwDyJRMj4iSyLGkKyeGjZ3ZbCY iWbp3HP2giyOO57mIwxxH+40HPuJg9dCzEt038xQDqroNzfphBpu53JfcDL54Afu5Ne8 Z4EiUfpBI4SJNIScYmEev69woLHX8LRGjrIzi/TD/DZi+6Pyhelilwz+c9U1/YzGBPfv 70rqI8oRPkknSrNkQ0/MEyOIy+lvvM2OQx6ngQkWAgLM1G/SMdDrtW1wdoDAQOlvo/u6 1vQA== X-Gm-Message-State: AOAM533BpdVeVjcGUeKJ0mJX60JLwzNj1aeHMHAMFG/Aq/5H9ab3bi10 w0ZPMec6KuKR6gvqZ1SOqZw= X-Google-Smtp-Source: ABdhPJz6iPXnZ1bVZfGhblaiVWq7jqmsaA0sDVHC70vQOG+pEbSsL5Jmu31ST2PpHeuV1k01nEMjiA== 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_231419_359529_633F0ED6 X-CRM114-Status: GOOD ( 18.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel