Message ID | 20221116144908.234154-3-gsomlo@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp182574wru; Wed, 16 Nov 2022 06:53:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf42cDRXxfzpF6d2RFAMEBJtWOeFBDzav9uH9bbEvPedAiwnO4NHPbno+DywHVXUCcqrGCUc X-Received: by 2002:a17:906:bc97:b0:7b1:6b94:129a with SMTP id lv23-20020a170906bc9700b007b16b94129amr6455955ejb.328.1668610400979; Wed, 16 Nov 2022 06:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668610400; cv=none; d=google.com; s=arc-20160816; b=mYP11AKbDOsp57Efv1oX8sYcLsNslBkjxxobRhBAp+t0NbKTnP/oxRBNYfxMyQDAem 7ImMveQt7R86L2EHcY9Cmp6tMrVISzSEhP/NcCMUCndk7Od8kUuwvJOEa3amG4TGwBWk muSvyn2HF4s+hXBDb7fLiSoBOOFTP3X5l4f7YhoMnVTlkjPK+GxJF1aLOVrj4xLNZqK1 2mOBXrQUO8FxwVidrwBsXrnOvNMFus4UGme50+8HBu04Pqd6X6KBzShdYwvxS09cAEfF ZOu80ZPQ+dskAj4YXDRD14F/MNzloX0a544srMF6CXcd5YxAASQwZUr3xFN3kqr3Allz b7tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xhR7eY/FHUNkamlu87P06c2sFlG0j+sFMpgEhxSGbjE=; b=K/3p1YXUHDInVn2DQkfUYi9B/FwivgyrNP2Cj0m4cbpJCICknLI7R0sSK56g8YGm0t SnKZPiC0qXE7tjGK1UwkUym9Mi+z67NMa1POrZL0g8MI3QMp0G0nR+g2eoo/ycl/OGCR iJrCrzA+tZFBseitnONPeGcCizBGDZjefKSiq1jQ58Bqlct6ZyJwK2Ds6aZpxnGmtLMc HTbhGhEoszVCV3HdZeG53XJa3yuXFDJtjuzYsm3OQ5YFpsjiwbcrkPxgDSy0u5JeM1Go ngF1duEHFdg+6NzuuoQx7BzQ6COVRyb1Hl63rPQpr8NPe40PuiDxELGmmVZOD2DBIzfy /xnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z8AEhLrj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd5-20020a170907628500b007aea2b23905si15692490ejc.812.2022.11.16.06.52.56; Wed, 16 Nov 2022 06:53:20 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z8AEhLrj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233421AbiKPOtV (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Wed, 16 Nov 2022 09:49:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233311AbiKPOtT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 16 Nov 2022 09:49:19 -0500 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AD651A218; Wed, 16 Nov 2022 06:49:19 -0800 (PST) Received: by mail-qk1-x72a.google.com with SMTP id i9so11718925qki.10; Wed, 16 Nov 2022 06:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xhR7eY/FHUNkamlu87P06c2sFlG0j+sFMpgEhxSGbjE=; b=Z8AEhLrjv453G4hwPs1L5mhG7GbIvre6FObGi8TKYbrjzVV0Z/cPvFGjtqKKIVjFEZ WenvBmMN9WZ691aONBMHBR7YVW25qnB50D6vBJedMXs8MY3WcZpjbp/f4X67hEdltbp7 7q475laYXvWLLcpqU0oW04fbwSbxK74DBNUwjO5aLRsj7xPfCguq3E54WtVXWk5AvrWL Lq124W/b7eAUDNibkkl6kN5LWVU2TZ8dgTyzs0s1f7YPHBW7bIUPGyax+RxHo0rUqLhE t5spOsmpxSx4YQYwHb1hhtwjRmEiPvTo2JR0+SyS14qiFjthfwpy5ZwQuCy83bOFl0vL u4yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xhR7eY/FHUNkamlu87P06c2sFlG0j+sFMpgEhxSGbjE=; b=465dlKJ6EM/iFllbjhs37nW2AR9wt38MYhq6rIfRm0u2P0wIdS4Nv9CZGTiWxkj3XD 6E6nL9f+YYq3w4JTwv7Usq6fWG4XvfcnQNhTwKeCZh3mJ8vCwqs6lSxjYZFCSyNc0K8A JcCULrRC7JNBL3XwhORaESr1ujjplEHPfXAJ/pYFwJ7CaXvZLl9L8J/i/LZP+YOHORrx sDJ9lfM0V7q6XXRhY448KqhF8FujAlxSTuAD7FkLJWRTiB+AQLNLj8AAQe1u/0J5X3i2 0+4y8Fc0R3aoP7F10YzoVDMdi/hswrweNV1EQ3jJRMee8CrZgieoFGmDtFBjpcQsoC7H ia0w== X-Gm-Message-State: ANoB5plUBxqr3WhH1Y1jdgqZX7hHjhGpynU0fUTR/KWQ9V78SipApplj 5YjSVulnvlaZt12cEFwyrwnyCVEdKp8Few== X-Received: by 2002:a05:620a:20cb:b0:6f9:26a0:53af with SMTP id f11-20020a05620a20cb00b006f926a053afmr19127501qka.768.1668610158036; Wed, 16 Nov 2022 06:49:18 -0800 (PST) Received: from glsvmlin.ini.cmu.edu (GLSVMLIN.INI.CMU.EDU. [128.2.16.9]) by smtp.gmail.com with ESMTPSA id g5-20020ac84805000000b0039a55f78792sm8729624qtq.89.2022.11.16.06.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 06:49:17 -0800 (PST) From: Gabriel Somlo <gsomlo@gmail.com> To: linux-kernel@vger.kernel.org Cc: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, kgugala@antmicro.com, mholenko@antmicro.com, joel@jms.id.au, david.abdurachmanov@gmail.com, florent@enjoy-digital.fr, geert@linux-m68k.org, ilpo.jarvinen@linux.intel.com Subject: [PATCH v4 02/14] serial: liteuart: use bit number macros Date: Wed, 16 Nov 2022 09:48:56 -0500 Message-Id: <20221116144908.234154-3-gsomlo@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116144908.234154-1-gsomlo@gmail.com> References: <20221116144908.234154-1-gsomlo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749664819646414097?= X-GMAIL-MSGID: =?utf-8?q?1749664819646414097?= |
Series |
serial: liteuart: add IRQ support
|
|
Commit Message
Gabriel L. Somlo
Nov. 16, 2022, 2:48 p.m. UTC
Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions.
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
---
New in v4:
- explicitly include <linux/bits.h>
drivers/tty/serial/liteuart.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c index db898751ffe3..18c1eb315ee9 100644 --- a/drivers/tty/serial/liteuart.c +++ b/drivers/tty/serial/liteuart.c @@ -5,6 +5,7 @@ * Copyright (C) 2019-2020 Antmicro <www.antmicro.com> */ +#include <linux/bits.h> #include <linux/console.h> #include <linux/litex.h> #include <linux/module.h> @@ -38,8 +39,8 @@ #define OFF_EV_ENABLE 0x14 /* events */ -#define EV_TX 0x1 -#define EV_RX 0x2 +#define EV_TX BIT(0) +#define EV_RX BIT(1) struct liteuart_port { struct uart_port port;