Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp428240iog; Thu, 30 Jun 2022 03:37:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sf98b68cS+kpZyMDmphCn+D2oOQYlbMkHCoHDVA1cKcQKoHS3e4aaDLiDRT1gYBIDCD+Ry X-Received: by 2002:a17:90a:ab16:b0:1ed:2251:a878 with SMTP id m22-20020a17090aab1600b001ed2251a878mr9541071pjq.231.1656585443997; Thu, 30 Jun 2022 03:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656585443; cv=none; d=google.com; s=arc-20160816; b=BycK0OR9h5iriLkZ1h5ywkTcUKcQ4RzwG1+FDUvLeHq3nfNzxjKSC8tn4fxV5cPWuk GN+2dbQokOS0Qd/cgdQRiY/ynn0qZPqwkNnzZ7b35AQaAjZ/TSs44aGUTDAOdUUIGpI2 xEE6XhuuZ+89p/A0/8orD4DlRszeOycGkp+m8CvjJF/vrdbQRtuGmfJtqPMceujqdqL5 nPblvb6U7rZhB7dUWFcLDb9Z4jBQB9gmy237zSRhOV3IlT9dWVE73uKfedIN5DW4/qvv jRd20TlZpihhcxI47xjL6XZtd6OL9NO0E8g7uTCD9Uc3Dv5ODK5XQy2JfN73aXkPVB3M XVTg== 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 :message-id:date:subject:to:from:dkim-signature; bh=m6ER2E7SD8b3/PFIGHr2eQktYZbByBo7DPO3QAa/YTM=; b=0ZCcTALubJTGKZVwQhv2/eYtHJzDV0eF4DhpmxG3Qnv/X7VXEFQ4b/EU4y+ksLRIEz pdhGzgHMDPQCONdRzlRUXSrXd3YW/nl8m/Ng9oKDltl761H/yB85kgscdyJ1hnMCy9B9 s59WepwW2rPRe8Zh6tIjKoS18KS4xN3c0ssd+AcxjGjjIWK59cbUVRiL4f48ZVGRqHHl OpxGlxisGJA2zjLUld5QJXLPftSD7megc42g2wo2NW5kSnSo2GPKh7PlRBl/fkO/+jPa Q2tqPUoyNZPD9Y2K7AE+z2s2KyWHqUZ6RcKY630Ns5DtfQLBf1nh6CiRwLZM5dqzBIOH CEHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PNBZq6mf; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a639349000000b0040c0b20e2fasi27045480pgm.699.2022.06.30.03.37.10; Thu, 30 Jun 2022 03:37:23 -0700 (PDT) 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=@intel.com header.s=Intel header.b=PNBZq6mf; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234762AbiF3KGg (ORCPT + 99 others); Thu, 30 Jun 2022 06:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234754AbiF3KGU (ORCPT ); Thu, 30 Jun 2022 06:06:20 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B9A244746; Thu, 30 Jun 2022 03:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656583562; x=1688119562; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=aArJ+/tttqsgdUdRKLHM2+KGCl1I1CRCDeLBubWfQwE=; b=PNBZq6mfFWoqxaaECS3VEiO0KkpuyCXqzm5ALCfjpjhy4OY0OIPq1s6e ZFDFu6/j+9ZUOFneOTXYW6NA4mrPctVPj4ivRxMgcbHBKHCBQWKVaUDY3 78CMJSnMbV1qkha+yNV2QAKy3xvlSKif60F5/leAaIyahgGmhJ82T8hzU Xr8h6y7niYiawspT1yPezh0a+DyLR78p0Nn3aCGT3r2vmGxboAlY2FhsB YYHPK1Gm2XYYw1yYNIRYlKbZS72s6my6Zp/Ua2Y06kNuPoZGOLqcqRkq8 DIajF5/jgscf+SNcnL+XFh+R7TlRGsOiJ1PzDE7zNuZjZhW/hVqR6Wra6 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="282340073" X-IronPort-AV: E=Sophos;i="5.92,233,1650956400"; d="scan'208";a="282340073" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 03:05:49 -0700 X-IronPort-AV: E=Sophos;i="5.92,233,1650956400"; d="scan'208";a="647826781" Received: from emontau-mobl2.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.249.42.178]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 03:05:48 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] 8250_dwlib: Convert bitops to newer form Date: Thu, 30 Jun 2022 13:05:36 +0300 Message-Id: <20220630100536.41329-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Instead of open-coding, use BIT(), GENMASK(), and FIELD_GET() helpers. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_dwlib.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index da330ef46446..a8bbed74ea70 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -46,21 +46,21 @@ #define DW_UART_LCR_EXT_TRANSMIT_MODE BIT(3) /* Component Parameter Register bits */ -#define DW_UART_CPR_ABP_DATA_WIDTH (3 << 0) -#define DW_UART_CPR_AFCE_MODE (1 << 4) -#define DW_UART_CPR_THRE_MODE (1 << 5) -#define DW_UART_CPR_SIR_MODE (1 << 6) -#define DW_UART_CPR_SIR_LP_MODE (1 << 7) -#define DW_UART_CPR_ADDITIONAL_FEATURES (1 << 8) -#define DW_UART_CPR_FIFO_ACCESS (1 << 9) -#define DW_UART_CPR_FIFO_STAT (1 << 10) -#define DW_UART_CPR_SHADOW (1 << 11) -#define DW_UART_CPR_ENCODED_PARMS (1 << 12) -#define DW_UART_CPR_DMA_EXTRA (1 << 13) -#define DW_UART_CPR_FIFO_MODE (0xff << 16) +#define DW_UART_CPR_ABP_DATA_WIDTH GENMASK(1, 0) +#define DW_UART_CPR_AFCE_MODE BIT(4) +#define DW_UART_CPR_THRE_MODE BIT(5) +#define DW_UART_CPR_SIR_MODE BIT(6) +#define DW_UART_CPR_SIR_LP_MODE BIT(7) +#define DW_UART_CPR_ADDITIONAL_FEATURES BIT(8) +#define DW_UART_CPR_FIFO_ACCESS BIT(9) +#define DW_UART_CPR_FIFO_STAT BIT(10) +#define DW_UART_CPR_SHADOW BIT(11) +#define DW_UART_CPR_ENCODED_PARMS BIT(12) +#define DW_UART_CPR_DMA_EXTRA BIT(13) +#define DW_UART_CPR_FIFO_MODE GENMASK(23, 16) /* Helper for FIFO size calculation */ -#define DW_UART_CPR_FIFO_SIZE(a) (((a >> 16) & 0xff) * 16) +#define DW_UART_CPR_FIFO_SIZE(a) (FIELD_GET(DW_UART_CPR_FIFO_MODE, (a)) * 16) /* * divisor = div(I) + div(F) -- 2.30.2