Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161961AbbKEHWi (ORCPT ); Thu, 5 Nov 2015 02:22:38 -0500 Received: from mail-by2on0092.outbound.protection.outlook.com ([207.46.100.92]:52960 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032409AbbKEHVi (ORCPT ); Thu, 5 Nov 2015 02:21:38 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Soren Brinkmann To: Greg Kroah-Hartman , Jiri Slaby CC: Michal Simek , , , , Soren Brinkmann Subject: [PATCH v2 01/10] tty: xuartps: Beautify read-modify writes Date: Wed, 4 Nov 2015 23:21:10 -0800 Message-ID: <1446708079-1105-2-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.6.2.3.ga463a5b In-Reply-To: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> References: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21920.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD001;1:k+g1O0W9znZ8h1mpY/QGYBonNnjLZTdqjQtBzS6Ar/liYj+5w/EVshk07/stjqcPuv+5vZgmW6zGTkXzQ7wNJWm+QWbFIY4B0e0ycUngV2HlmCYyRBWbN2ijT3KiFU+F7BnB8Hse20S2KvxlY4VVu5nNaHXIgG+lfYWHugcL2m09d60qF51eyWvfN10+jraz5SPsCM5AEex7fzyNhbDKrfFWZ9myCEMQIq4mzfYLuFwFx/4zNtcPPustED/L2X7Ia3yNUAlDp2EEdfJhLxpF5LMj6bzRTDLSNJS16T18cMeku2vG/lvsaPEnve6+pJDK7XhY9RMFkQODcUIbPiZ5trxXqKzLxBmfRd0MgIk81jQ= X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(57986006)(33646002)(87936001)(5001920100001)(36756003)(11100500001)(5008740100001)(6806005)(50466002)(5007970100001)(106466001)(229853001)(50986999)(5003940100001)(5001770100001)(50226001)(76176999)(81156007)(63266004)(575784001)(5001960100002)(189998001)(19580405001)(107886002)(47776003)(36386004)(48376002)(76506005)(86362001)(92566002)(2950100001)(4001430100002)(77096005)(19580395003)(16796002)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1BFFO11HUB039;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB039;2:Yja7XERlvXC9fJdseqA4M+/FHsZQNHFvkYHBAvdQT7v6+nTNODR6IdSc1F2uaNx0iK/OlZhZPnArlcMYGOg/zzgHOCb0h4UfD5yhkqGIvPIzClzEo1mPoXJpk0kRBq65afFNa/plM6d8jx3INDS1LY8izDtAftzM5yxmqvILYMs=;3:e8UVNWwcVxe3tF57K15CManxmWRxoerULSTTqzjSWH8OF+Tx25IoQL0tLdH4wsu+I7cWLQt6JapG9PtEc5acOLbWcY6aW/oWY9hWi2BjVM2uCO95Nw1vWPzyS50v4VWtjERlxoA1TgMSj8iOgQ4PQatHfkRILUBCyK73kCr0GmGH6JznIKFPlGdd8NcIm6TItjpaCLUGu3D+/B3tWncdbS7oNOxqpAA44VrgpOIqBGf9QBAskaPYLvwSuJJ1VP+IexD023bkRYWauxRygKRSNA==;25:qEqiD6x5tKTEwyhqO/p9VN6fG2BxlpvCYILVd3EHr3Y9pMrHHxwLWEKQGYNmzgIHoNcPRjiwzjcmacqNPAlivYpenD1or8Fwe2OBac7bZeRvHQM27H9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JiIRwjuBXcYYRpUNcdlzHQBc+OyvscWaI6HFZ7wEDZ9RIie2p/k3yKgvzbapW29trtmfqRrRq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:BN1BFFO11HUB039;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB039; X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11HUB039;23:vfecd7L1Ue53NH1d7sX75fCytjoQ4qVgKE2iblt?= =?us-ascii?Q?lNUiwEod6MF/L/D9FIXBTQACERgFt8mTlFby9GzNhPhNf60fQoJtaA9DIjF1?= =?us-ascii?Q?mhTAtxLnMwwblrDa7OOW5iN7JmYv99U2l+B2KWG4lflFVG4O8qvJTlTmF5KZ?= =?us-ascii?Q?MnIxJxDLUkW6dUtnDjg0DwWasmaRR9Dd92N+3CQuS9q5DltMVyQ+prY+POIm?= =?us-ascii?Q?ZZhxQP5qGFeGMfIvrSn0c+ZkHi0e397wq7/DhrzV9XqSOlLGW+KSi13xfdvn?= =?us-ascii?Q?TiwNzAFyu3DRCAwjTj09PXESlSAHqFylTelr/o40MoBo69H3LFGCKxtqSRv8?= =?us-ascii?Q?8IDbYbMs1TqZrY02PK7MXbIpnd5QOvYXu5z88esMXeps95snG6e73IaIrVlN?= =?us-ascii?Q?HrC+48VTSLaIIoaictvKMtbykxrBd8qzWSv5Dio5+gx4XNOCsjnNa+Pr+4JZ?= =?us-ascii?Q?sTkNglbWijJivEoU1CZFt7AkVYTsDl6mJLLrI3zzJS+s9AxkAlPFZ4wtA4CV?= =?us-ascii?Q?OkIKwIB8iKP5F0KNwCqdpMoAn6SO3mRkuHN920U1IR55DydSUQfkbe61i8xl?= =?us-ascii?Q?JNZqL6LeNsh08i7qHOzboX08OfmALGy/BxjOMub/qQOGROTAqwoV3c8ju0Z6?= =?us-ascii?Q?6Xz0aAfK+6pB1hOb+kh2kk6bzgvFTGnBmzqvScZr6CDaxdU6YySsHM9WAq24?= =?us-ascii?Q?Cv1GC8v7GeBB6dq2YEsyR5xz78EM8TYLVPMXShvnb/EQcQqD69et7SsDOCrH?= =?us-ascii?Q?FkP0kwapRYMBEuGHAXBnirmcvwHf2DEnDpQSPuFNft4X6G7AYOXuyGW9Lu6D?= =?us-ascii?Q?GLFQwb0RakBapWDnEIiXE4osCB06AJ2cHU26LCrAo17Dr3zKmA2LTBBcOZav?= =?us-ascii?Q?XTWtG8bNYFahbrzX58dlMP6R8gNO3MoMdwEfEE+XSeGU6NmcFAqXFbHsItJe?= =?us-ascii?Q?pJVByzOGIaT2akA6BP2Z339JpTC3jm/I3Ry8U04ZxvEcIkhjf1vYsIHIvtPi?= =?us-ascii?Q?Ic8ltSgjzPeVJic8i3QVMdnQ7zbqRGZzxsKtPyWU2onRve0A9jEADkpuE+Rk?= =?us-ascii?Q?6C3qJ1A37JfmMWVXzBbmWlp2KGtRq+g0vSMxrr2TyFx1cMQ6S0C+CKx4Ldlf?= =?us-ascii?Q?OHjLA24xpcRKvvsMYIVFGBZdUOeImjfsG?= X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB039;5:GPXnkXxyGV8Bu6csP84omEZ49d1qPHHJeaaYp5Wx1I9VzWKRO1f+3DHiSZv6zMxIwseyxEXBNq8m1t3P4U75epbLM46Tx0PH+zgp2mIAUcOVIewI2FOBRvTGveL9X/0TL9nnZgmZiNKTKPd0NqpJEw==;24:bMSEdFrH3/YXLnlDfAxVPp+rn/cvtaGJ32LX56WvHBikywUlZuHWyDS3U10qjpojpZ/4jQ/I8HXIXH6OnNTQZA/KBMniBtdsvv1b2m5FDwI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2015 07:21:34.9670 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB039 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11HUB050;2:r8gGmXVHM6ZjAW4c5+0uAN0AF1MDI/sAl1bPFCodVezhKSZRmpjgpb2O6n8xlDrcLRpmqRjKQun9TpBkGijx/4GhEJkO3EsVjy8yjc+fKOF1hXpMIMxaIMAPaMdCJwsACgV5feqUKp231ItLQwUKuVFpOeu+BS515SEBJ9HCrq8=;23:nEMSu1zwrddeC8ThIjh7Nxs64pPXmR8nG6/EKMdZrJYC/8y4K1JRFlrkOLohoj//PY2qfj7dKdiavRX6uTvlXNOb1U8eTRS0hE1YdI+OxSwwfgKQeFdDfdJ7DskmstEv3uZIsJqbvDw9m+izkV5S5yUzb63hlJJL1j0haZsUIMk3uagVONlo6q36XGaE2kLI X-OriginatorOrg: xilinx.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2024 Lines: 50 Non-functional, formatting changes to ease reading the code. Signed-off-by: Soren Brinkmann --- drivers/tty/serial/xilinx_uartps.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 009e0dbc12d2..50d4082d2354 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -515,12 +515,14 @@ static void cdns_uart_start_tx(struct uart_port *port) if (uart_circ_empty(&port->state->xmit) || uart_tx_stopped(port)) return; - status = readl(port->membase + CDNS_UART_CR_OFFSET); - /* Set the TX enable bit and clear the TX disable bit to enable the + /* + * Set the TX enable bit and clear the TX disable bit to enable the * transmitter. */ - writel((status & ~CDNS_UART_CR_TX_DIS) | CDNS_UART_CR_TX_EN, - port->membase + CDNS_UART_CR_OFFSET); + status = readl(port->membase + CDNS_UART_CR_OFFSET); + status &= ~CDNS_UART_CR_TX_DIS; + status |= CDNS_UART_CR_TX_EN; + writel(status, port->membase + CDNS_UART_CR_OFFSET); while (numbytes-- && ((readl(port->membase + CDNS_UART_SR_OFFSET) & CDNS_UART_SR_TXFULL)) != CDNS_UART_SR_TXFULL) { @@ -1123,8 +1125,9 @@ static void cdns_uart_console_write(struct console *co, const char *s, * clear the TX disable bit to enable the transmitter. */ ctrl = readl(port->membase + CDNS_UART_CR_OFFSET); - writel((ctrl & ~CDNS_UART_CR_TX_DIS) | CDNS_UART_CR_TX_EN, - port->membase + CDNS_UART_CR_OFFSET); + ctrl &= ~CDNS_UART_CR_TX_DIS; + ctrl |= CDNS_UART_CR_TX_EN; + writel(ctrl, port->membase + CDNS_UART_CR_OFFSET); uart_console_write(port, s, count, cdns_uart_console_putchar); cdns_uart_console_wait_tx(port); -- 2.6.2.3.ga463a5b -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/