From patchwork Fri Nov 18 14:55:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel L. Somlo" X-Patchwork-Id: 22366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp239134wrr; Fri, 18 Nov 2022 06:56:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Tj/X74sKmxK5rFsXiGm4n0vmsvGQdhzPae8JdbwEuKVymT02Lm3248blrfPIamVhMaGKJ X-Received: by 2002:a17:90a:307:b0:213:ff80:b37f with SMTP id 7-20020a17090a030700b00213ff80b37fmr14267560pje.118.1668783370510; Fri, 18 Nov 2022 06:56:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668783370; cv=none; d=google.com; s=arc-20160816; b=z75UFp6HW0Mijv6HJGaR1MWOoMps6HoMQr+D6SdxdDhHkS1zd7e4pn5KvJeGQpKxcM GhUTeAyCZvQZnOux6xScnny/1mYINo+3BC0XyimbpGSsGEw97YS+/RCNwFmJ4XhPZyNw roYRUljBIq3t9vGiPMQlGVnTouBlBVSNxztTcAQFCADt0X5B23PHh819BmAUNUG8dR46 ZlhzxkUGy5huOaga9TnOR7vT/Qrm9E0Dbxhgc8SgXZtZR8ukfncXLQJm4wadGUMlOenN gPw1lv7L0yfZRsxYZ5EFjwcbKYN+T/F0Fxw3wTkvRDX8CB9oEVJSQotI3l3sWiLzJ4sA OSHw== 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=Tc4HY0VxnkrPwWL9SQWES+FDxkDFOlvOrzE7fQZCEi0=; b=kTvRheobnQiKMX5To4M+QW1P/r/5nyADMsg8DdWCUM8+66jmJbV+YF0Jv6f06zM5C4 vGgrZS7N1+cDrGuWTbv7n9BCiB7fRqQJdU8ptpIqDNzQvv7XGu9CJj0u6D69ia908Mdm yqOtbT3Oqthmk6EDmWRNFdEPY/TC08BkotxNJoFprC9UkHCia41P06rDMWnMcBzqXrVT QM/sth7YAKu2lzfGk45e1lazbJTA/rp93FjXT3CACdPkWgirDN5rOb+ijyhlF7/qSd1z 0QOC82KIxGrSIdegxaAHd/AtC5XN5UQEmNy2HGe0W8iuVaPyLSJ5fX5hGHmsocGatNLI KAdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="k/WRK8g2"; 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 nn10-20020a17090b38ca00b00214021e87d1si8192836pjb.173.2022.11.18.06.55.56; Fri, 18 Nov 2022 06:56:10 -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="k/WRK8g2"; 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 S241855AbiKROzf (ORCPT + 99 others); Fri, 18 Nov 2022 09:55:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235204AbiKROzY (ORCPT ); Fri, 18 Nov 2022 09:55:24 -0500 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FFDA240AA; Fri, 18 Nov 2022 06:55:23 -0800 (PST) Received: by mail-qv1-xf36.google.com with SMTP id h10so3468997qvq.7; Fri, 18 Nov 2022 06:55:23 -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=Tc4HY0VxnkrPwWL9SQWES+FDxkDFOlvOrzE7fQZCEi0=; b=k/WRK8g2SEfJ5O9BGJ55V/tUDmsRuk+S0Tth9ZspZbygnYVlV+bGlt/eujeVr1Wibj WprtDDRss0y3sZJb4vvnelUeql8LflbUiV8JjpaLp6j16iC2/Lx3q5AeYo5z6bJfylNN a+QtDK5fgo06thjzayOKfUPE7efXXC9Ibk8C0ucY8xzzj4a7B326HhG1fhehDuJKSaPz 3a0/5g1Xz6ibqVg3y269dVeBrDD1CK9T4Xxs8//u7w3WvNu7Dnu4ftTmvNziA+SeRCzj cC+aB2R+shxZ6yCbS2aZP/W6+Al/ApayA2fdGEGUlfZlqJ4PGVBs+2FdwZIpifkM+JDq fq6g== 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=Tc4HY0VxnkrPwWL9SQWES+FDxkDFOlvOrzE7fQZCEi0=; b=ocfyJTSENHXUwb/kj76tE5J1hkn3M3lfKv9XPCUpYJ+aA9OeDxH5oEdh7x867dvMTj a9Odb1AGcBWinjUGAJ1AOXpsPB4/uvD+2XEoUoFN4bKa8f/fP0xIix3xN5FUKbC0kzEf dkj+Gp++I0aje+PmX6HfvzY/vSBqW7Z9muCUMOiE6UpQOh72jI4SWZtmEvmN21uTLmif lIjDaEHoueejTNgHGb6mere32hA3f5HCRb2I+XwddR9EUKRp5stBRQt6RE0LBvFBnlf+ qTNh8qDvj3ivgFptXzeGpHqWAbgEC6cxEWfo6NGk2qx0IZ/v6Z5oSL2QQNHFjykLOVaR zTLg== X-Gm-Message-State: ANoB5pltDe2So82EJ2yH6JV9CTAato1jE1BXxpURs2Wq5qCGGBs7oIZG +9gI2p7I2yUwKCIk1e0dKWyJX+Ql/yW+FQ== X-Received: by 2002:a05:6214:328f:b0:4c6:82cd:92d1 with SMTP id mu15-20020a056214328f00b004c682cd92d1mr6940562qvb.82.1668783322306; Fri, 18 Nov 2022 06:55:22 -0800 (PST) Received: from glsvmlin.ini.cmu.edu (GLSVMLIN.INI.CMU.EDU. [128.2.16.9]) by smtp.gmail.com with ESMTPSA id m125-20020a378a83000000b006cbc6e1478csm2397269qkd.57.2022.11.18.06.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 06:55:21 -0800 (PST) From: Gabriel Somlo 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 v5 02/14] serial: liteuart: use bit number macros Date: Fri, 18 Nov 2022 09:55:00 -0500 Message-Id: <20221118145512.509950-3-gsomlo@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118145512.509950-1-gsomlo@gmail.com> References: <20221118145512.509950-1-gsomlo@gmail.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749846191522906960?= X-GMAIL-MSGID: =?utf-8?q?1749846191522906960?= Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions. Signed-off-by: Gabriel Somlo Reviewed-by: Geert Uytterhoeven --- 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 */ +#include #include #include #include @@ -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;