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=unavailable 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 5D682C433B4 for ; Wed, 19 May 2021 06:34: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 D56AE6023E for ; Wed, 19 May 2021 06:34:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D56AE6023E 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=sfcJj46xx45vj/jLnC/IH2lwJhEEiJBNhHJ2Ab5atN4=; b=g25sWTPJ6sGxizEyvdKgFEl2X d51n9YXCltnwwt4xH0GipRdIbgG/QGAfkJRsq+HS0NfjmoY6RVpaAuQl5em6gkfgSCMoQ0yQAVBrI VtQ5mextliT0vdA2amDJHk6nlRr3VvsDSEth8TeIy1xewy1xhzEVP60SeAgRwcF2fj4QqbUWXcxQK /f2i2XnP8nGr92GcY5q7oYDw3FQp9wRGx6emVYLldwvUWaxTfZEpfJQVuvVlud6ihfpbZQQ6VK443 Fuw3w7wMvw0KgAWqHnAyd2rNCJBd1wbRQKepx1W9j969+sl7qfhnCPr0l0cwnNACFU2Lx+L+H1xQR JjERifkfA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljFkk-002zno-Aa; Wed, 19 May 2021 06:32:22 +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 1ljFkh-002znP-HS for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 06:32:19 +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=j/woY3wUI9Ol7gIpKTK/4dqj6Jzmp8dptTJTfnXhBXM=; b=40O5fedqKC4rShWBhl0dN97cTI 6WBi7OpBXYRg4uAPblIN7d1VsB67IfmWHUFWw9jdjVhTfBPqRdrozWUblnrQKB7a5vuBhzsYC+2Ob 7Wkz9JIRXDinznMVJRZN5qTdR3HTw7bwpXou2pLyEtZtM77LStVbtspUR2shdF7+QJ6RDIXf/wDUt z096OwRd+vwiO53R1slNiA5UyBiHqJobzDMSNMWoOwxvaDLYppR3nFMBF+1sXPSz6CBpNrXvNMDnz emhiARvU/plZe2OKV13OlokUaNtr3YOXKGpCPr7np2FV4bh2dMO4otu3kgb4z6pU1bN47yaniul9x /SDFctLQ==; Received: from mail-wm1-f52.google.com ([209.85.128.52]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljFke-00FBI8-LR for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 06:32:18 +0000 Received: by mail-wm1-f52.google.com with SMTP id u4-20020a05600c00c4b02901774b80945cso2730762wmm.3 for ; Tue, 18 May 2021 23:32:16 -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=j/woY3wUI9Ol7gIpKTK/4dqj6Jzmp8dptTJTfnXhBXM=; b=rHOwOu8jHwnjwbrZ6zbDrOlmCeP22ShyuNQG9iOVvE3jXHBsDEhi5Vf5KrCoPSqcrP RNcE6NHnO70g1Nl806jo0/BTD27Cg455vduJkCDz+S/XGYWFnEkihFeCzRxeD5z5Uxqr GJRBfUjwIsDl10f6+SN2jWvBQmwzt8lenjms+DrUxoY5LK4x4J5OjsLKGKkD8+dx4Swn BkU/5knWwthVUw3ai7DzJSzYq5Dd2PaoASVuTNFyaaLrPKwufDNbuNT/LXimafNjxJB/ zS3Nb7vwVDM0JQDTGYSuYLNNLIIk2IS+qhEF+s+7f+q1GiQgueHVzGE4on+vUspKKJUo 9Rmg== X-Gm-Message-State: AOAM533uq8JdLIZSDPiUS5csueKZvnXj+y0FJdeb7uhFmWyCWoLdRwoq 04kD/sG1sPuhBlE5apCfizA= X-Google-Smtp-Source: ABdhPJzqXzsWrot/yJuG9Dp9Wg69TTI5G9IYTHbq8MKYRdDD+NlPOP4/TQYQFmB0IgIwr+0Iq0Uq5A== X-Received: by 2002:a1c:1f84:: with SMTP id f126mr9277306wmf.189.1621405935037; Tue, 18 May 2021 23:32:15 -0700 (PDT) Received: from ?IPv6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id g11sm23779444wri.59.2021.05.18.23.32.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 May 2021 23:32:14 -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: Greg Kroah-Hartman , Joel Stanley , 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 , Milton Miller II References: <20210519000704.3661773-1-andrew@aj.id.au> <20210519000704.3661773-3-andrew@aj.id.au> <56ec152a-560b-1eed-97e2-c12e4fed171a@kernel.org> <2bb7dfc4-a20e-4e3e-8fa5-74ff264c4e44@www.fastmail.com> From: Jiri Slaby Message-ID: Date: Wed, 19 May 2021 08:32:13 +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: <2bb7dfc4-a20e-4e3e-8fa5-74ff264c4e44@www.fastmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_233216_739176_83682D71 X-CRM114-Status: GOOD ( 18.47 ) 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, 8:27, Andrew Jeffery wrote: > > > On Wed, 19 May 2021, at 15:44, Jiri Slaby wrote: >> 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. > > Maybe the recommendation in the checkpatch documentation should be > fixed then? +1 since: commit 8bd9cb51daac89337295b6f037b0486911e1b408 Author: Will Deacon Date: Tue Jun 19 13:53:08 2018 +0100 locking/atomics, asm-generic: Move some macros from to a new file So care to fix checkpatch too :)? thanks, -- js suse labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel