From patchwork Sat Aug 11 01:34:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 143973 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp587883ljj; Fri, 10 Aug 2018 18:35:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxlOjMlz9+5HGQTsTLFBRnn6239F1CGZuVYUVaAAZs4J4SxV/xXNhAETOaOewSiCypH/quA X-Received: by 2002:a65:5581:: with SMTP id j1-v6mr8719217pgs.203.1533951329175; Fri, 10 Aug 2018 18:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533951329; cv=none; d=google.com; s=arc-20160816; b=a24Gk70vCQtNSbvlmxZD5YP3EFRjggSTeGKPCc90feJxjtbhw4btzabHEq+Q2fObjl xXbMLGgCVapIJCgqT0/DkvWK1gX8gyXL7ofhQoCDazBQybQIzP8TZXlZN6i5N/01D//e L9bP4D3cEBFo3TnwKT2Kh20xTmNa1Nc4WMMRVecq/iOMp9mxNlAp8efSPWlMoSRuzdRP HIw3e2ALEp3EROnRlJl6J3vSxh54eshoJtL1R4UWNy12WT+rzJxjZcLgsos4OVT10RuK rIei/duSFD/rQN3Ko2J/H7Jd74aFLNmc8UGOfF356BxJBe9HV42rHzQPDwbP4lX3O/Tr 9T5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=WS73hgKCe7tsfUIogpxbjOL5bwPxakTmgNQf6YebHkM=; b=Ai7xjfS1k0YT+XDhlVg7AZVHHbwa40hqiC7bAG2jy9PtiSTP8WNcPDBPhJYWUljjAr lA3b+u53Y0z3lp/hNdouNP58xRChNFGNcR1q/RqXzMLbyGtfmt61IZHjpmAVwhVoU4qd EiPoSiSYXGQVv2smS1jnphO3zUFE2CuDcmle0jQ+NCYrkI/qNbBnxi6y1QEr4nMBTBz/ tADveYCy43ZWcFqF34GVh4zwY3CQufgoG2WpjJre6avRgnHTr6mYaBS/kSuebaB1MXcg wR35MHxpKk0vuJFMqvfS0N+n0vr5kbJQ5fPrjZ3T0LSMaKjedGX8UM6J3XZauKRkJfHh EaMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F1q4Q8kR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si8735365pls.392.2018.08.10.18.35.28; Fri, 10 Aug 2018 18:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F1q4Q8kR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbeHKEHr (ORCPT + 31 others); Sat, 11 Aug 2018 00:07:47 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39193 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbeHKEHr (ORCPT ); Sat, 11 Aug 2018 00:07:47 -0400 Received: by mail-pg1-f195.google.com with SMTP id a11-v6so5130254pgw.6 for ; Fri, 10 Aug 2018 18:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WS73hgKCe7tsfUIogpxbjOL5bwPxakTmgNQf6YebHkM=; b=F1q4Q8kRQbiKeV+51mx6Ttf3MQkBrrl3Z4hYw+ukzjG1Ul12iiHG5MgydSNuW4N841 CvG0RFDals/ULGQlX5hser/Qov6yMMY92gf3Q1FLTOfRInL2pW4qbfdBTOqHZxAtiay0 xP0GCVacakhPsBJWPm8wRcFOlGyjUWf9Jw7fE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=WS73hgKCe7tsfUIogpxbjOL5bwPxakTmgNQf6YebHkM=; b=htCpvHcS75JemQ70OLMhnXhCEvazkvqqwqYuKp45R6D0wwgH2KY4nAj4xH3sCbJ6hm CAgQ/x8DFpgwXqtb8ficfE0exWiNb177HYYlNml2ossLrcxe9V9NpnT3MXmXF3ULV7j+ 194b+O0zUVEXagcCQBaeC8O2bvR+/KZ7M50TJ6g+O5kCWn7gBnqi/2WJ/cKX3FX+Zoso yBZXux/3eWF3hOTtmL8vbb+hD5Thc9Ptphue6MjvOSKrJj9BCVfGn8u8Bf/6LUcymOmK J3yONA3bCfFbYQCosOOJPGVOwGzctnwFziDndyx7/F8sgMizfPhYZWSFSJRJqojJMylO +DPQ== X-Gm-Message-State: AOUpUlGW7XK8r0vp7S8HM8Dln5M1Ma3yZTVZ61htcSmS7XqvZ0oyyVT3 t2tMBlOUf1Tc2cKmXzJZn4zR4w== X-Received: by 2002:a63:ee56:: with SMTP id n22-v6mr8166569pgk.402.1533951326176; Fri, 10 Aug 2018 18:35:26 -0700 (PDT) Received: from ubuntu.localdomain ([45.56.155.48]) by smtp.gmail.com with ESMTPSA id d22-v6sm21722373pfk.69.2018.08.10.18.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Aug 2018 18:35:25 -0700 (PDT) From: Baolin Wang To: gregkh@linuxfoundation.org, jslaby@suse.com Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, broonie@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] serial: sprd: Fix the indentation issue Date: Fri, 10 Aug 2018 18:34:27 -0700 Message-Id: <5952d0e2189677a247a8efabf356347e1e087187.1533950271.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org> References: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org> In-Reply-To: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org> References: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the macros' definition and code have the same correct indentation. Signed-off-by: Baolin Wang --- drivers/tty/serial/sprd_serial.c | 46 +++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 24 deletions(-) -- 1.9.1 diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 8d5c9cd..4287ca3 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -68,24 +68,24 @@ #define SPRD_LCR_DATA_LEN6 0x4 #define SPRD_LCR_DATA_LEN7 0x8 #define SPRD_LCR_DATA_LEN8 0xc -#define SPRD_LCR_PARITY (BIT(0) | BIT(1)) +#define SPRD_LCR_PARITY (BIT(0) | BIT(1)) #define SPRD_LCR_PARITY_EN 0x2 #define SPRD_LCR_EVEN_PAR 0x0 #define SPRD_LCR_ODD_PAR 0x1 /* control register 1 */ -#define SPRD_CTL1 0x001C +#define SPRD_CTL1 0x001C #define RX_HW_FLOW_CTL_THLD BIT(6) #define RX_HW_FLOW_CTL_EN BIT(7) #define TX_HW_FLOW_CTL_EN BIT(8) #define RX_TOUT_THLD_DEF 0x3E00 -#define RX_HFC_THLD_DEF 0x40 +#define RX_HFC_THLD_DEF 0x40 /* fifo threshold register */ #define SPRD_CTL2 0x0020 -#define THLD_TX_EMPTY 0x40 +#define THLD_TX_EMPTY 0x40 #define THLD_TX_EMPTY_SHIFT 8 -#define THLD_RX_FULL 0x40 +#define THLD_RX_FULL 0x40 /* config baud rate register */ #define SPRD_CLKD0 0x0024 @@ -95,11 +95,11 @@ #define SPRD_CLKD1_SHIFT 16 /* interrupt mask status register */ -#define SPRD_IMSR 0x002C -#define SPRD_IMSR_RX_FIFO_FULL BIT(0) +#define SPRD_IMSR 0x002C +#define SPRD_IMSR_RX_FIFO_FULL BIT(0) #define SPRD_IMSR_TX_FIFO_EMPTY BIT(1) -#define SPRD_IMSR_BREAK_DETECT BIT(7) -#define SPRD_IMSR_TIMEOUT BIT(13) +#define SPRD_IMSR_BREAK_DETECT BIT(7) +#define SPRD_IMSR_TIMEOUT BIT(13) struct sprd_uart_port { struct uart_port port; @@ -229,7 +229,7 @@ static inline void sprd_rx(struct uart_port *port) port->icount.rx++; if (lsr & (SPRD_LSR_BI | SPRD_LSR_PE | - SPRD_LSR_FE | SPRD_LSR_OE)) + SPRD_LSR_FE | SPRD_LSR_OE)) if (handle_lsr_errors(port, &lsr, &flag)) continue; if (uart_handle_sysrq_char(port, ch)) @@ -292,8 +292,8 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id) if (ims & SPRD_IMSR_TIMEOUT) serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT); - if (ims & (SPRD_IMSR_RX_FIFO_FULL | - SPRD_IMSR_BREAK_DETECT | SPRD_IMSR_TIMEOUT)) + if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT | + SPRD_IMSR_TIMEOUT)) sprd_rx(port); if (ims & SPRD_IMSR_TX_FIFO_EMPTY) @@ -333,7 +333,7 @@ static int sprd_startup(struct uart_port *port) sp = container_of(port, struct sprd_uart_port, port); snprintf(sp->name, sizeof(sp->name), "sprd_serial%d", port->line); ret = devm_request_irq(port->dev, port->irq, sprd_handle_irq, - IRQF_SHARED, sp->name, port); + IRQF_SHARED, sp->name, port); if (ret) { dev_err(port->dev, "fail to request serial irq %d, ret=%d\n", port->irq, ret); @@ -361,8 +361,8 @@ static void sprd_shutdown(struct uart_port *port) } static void sprd_set_termios(struct uart_port *port, - struct ktermios *termios, - struct ktermios *old) + struct ktermios *termios, + struct ktermios *old) { unsigned int baud, quot; unsigned int lcr = 0, fc; @@ -480,8 +480,7 @@ static void sprd_config_port(struct uart_port *port, int flags) port->type = PORT_SPRD; } -static int sprd_verify_port(struct uart_port *port, - struct serial_struct *ser) +static int sprd_verify_port(struct uart_port *port, struct serial_struct *ser) { if (ser->type != PORT_SPRD) return -EINVAL; @@ -531,7 +530,7 @@ static void sprd_console_putchar(struct uart_port *port, int ch) } static void sprd_console_write(struct console *co, const char *s, - unsigned int count) + unsigned int count) { struct uart_port *port = &sprd_port[co->index]->port; int locked = 1; @@ -594,7 +593,7 @@ static void sprd_putc(struct uart_port *port, int c) unsigned int timeout = SPRD_TIMEOUT; while (timeout-- && - !(readl(port->membase + SPRD_LSR) & SPRD_LSR_TX_OVER)) + !(readl(port->membase + SPRD_LSR) & SPRD_LSR_TX_OVER)) cpu_relax(); writeb(c, port->membase + SPRD_TXD); @@ -607,9 +606,8 @@ static void sprd_early_write(struct console *con, const char *s, unsigned int n) uart_console_write(&dev->port, s, n, sprd_putc); } -static int __init sprd_early_console_setup( - struct earlycon_device *device, - const char *opt) +static int __init sprd_early_console_setup(struct earlycon_device *device, + const char *opt) { if (!device->port.membase) return -ENODEV; @@ -691,8 +689,8 @@ static int sprd_probe(struct platform_device *pdev) index = sprd_probe_dt_alias(index, &pdev->dev); - sprd_port[index] = devm_kzalloc(&pdev->dev, - sizeof(*sprd_port[index]), GFP_KERNEL); + sprd_port[index] = devm_kzalloc(&pdev->dev, sizeof(*sprd_port[index]), + GFP_KERNEL); if (!sprd_port[index]) return -ENOMEM;