From patchwork Mon Sep 17 18:33:44 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: 146859 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4099918ljw; Mon, 17 Sep 2018 11:34:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZT/LZwaFPVkPI801XB8zSj4qxiguHssFfMkwc7cyC4u8PcQnBcVH1WRsjVEw4GReVXtdJN X-Received: by 2002:a17:902:74c8:: with SMTP id f8-v6mr10609371plt.95.1537209279195; Mon, 17 Sep 2018 11:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537209279; cv=none; d=google.com; s=arc-20160816; b=tYkANtDMgMKc1jAoT5tfyou+UTGIXbL2q0EwOPAWb9nADvlEi6T5SWaKlWWfOs1rJv 1S2QP/P31WgKYrJrbB2J+7oiuWrGPqr0ywdXBMkejHmqYnmXKpPAP0aDcEgCo1iNEU4J e8DeO1nx/s1wArw8RS22K56UXzgI0rJwAd9o5wEuDDr9qfFyx9CwHVqmEXd0WHSo73Zq RNkAfI5sf2cHwPPZ9oMwnLh+nBbhi2q0LU7dZLig3P9GdIFDqYd1j44XdjQ3ShxqhQVF w9FUxX37WGKXfS/+CvE59D1Etv2AairLF52nZlm03DxPcI25zOVQGA5cLzhvCBufJe10 mT/g== 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; bh=J/vusGba74ICjFHPdDPM4Bpl/VsNWGGNESpPLnHoQ/w=; b=DVrrN4jdLrLoTymaZdYAkq1YZmJKNnUdptvhD+IlbHZQ1GmIJceBfK1uDSSzSi0Qlk HTPKOtc0tc12Y5bhkjukXFM2srEzzOM9W6mRw3uh+WI+lsHAjili4i70EzVQo/uLlUw5 oCudQ7eFsCj2NauzqXgMcoO+UsHkjVDRATRGGBr5TAW+Z8jKaKfasXjJZBmBVsUXVCNW F6gTQsDz234Gv+WPHUxykSL10N+6eel62tt7Sxwg/R6iFtqcEpRHKzptU6GiKz2tUKow 8RapqJpBs8WMAOmwy4Z6mOdUFksAq18JPjKr+Vr2USuPUspwrC6lJYyvRy3c/hfcqjiS HUBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZXPCFtgo; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-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 bb4-v6si15734436plb.467.2018.09.17.11.34.38; Mon, 17 Sep 2018 11:34:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-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=ZXPCFtgo; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-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 S1728469AbeIRADK (ORCPT + 2 others); Mon, 17 Sep 2018 20:03:10 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41925 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728466AbeIRADK (ORCPT ); Mon, 17 Sep 2018 20:03:10 -0400 Received: by mail-pg1-f196.google.com with SMTP id s15-v6so8067872pgv.8 for ; Mon, 17 Sep 2018 11:34:37 -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=J/vusGba74ICjFHPdDPM4Bpl/VsNWGGNESpPLnHoQ/w=; b=ZXPCFtgoyBNS1eJD4LmwrNO5//mKpxFWKmNXO689APLn75mngiUHEzYzJG8RqLcLq5 zsC6w9QtDD5/qvg1oRTv4E3k1Up0ZdHQiPmuLVhChoIs69orvenDX5CXJnSdJ+nMjaZG LMVVJ1MEE6DqYTdQoV2zg+AxLa+KswhaZfAkk= 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=J/vusGba74ICjFHPdDPM4Bpl/VsNWGGNESpPLnHoQ/w=; b=UpU5f03FIGDmC8kvmtaT4kWdku3OpQbVzlTvAbgLzWuaG6uY76FBHeQYoB6YNGt/yQ dG12CPlh8Lp9bxSSbpF5LfetIRn3yk5aaioarTTlnFoYJ1oN5J1i3xwoa43y6m245cRr T8ga3xM+XRHFBl6lJWuin/L8QO3C57jV2RPQvUvpS3Pls65UO/heHfldNSHtrBWYliAy c5Gf1KTu9w0mBmp6EvgzGFt9TbItOunNe0up5HzMJGEyCdvSNKMJYOp5rk+d+swu/N/C DOOuxOlY4hviRAwitSyoytcdOX6KF2wk6kZ93r5xN5x+K2NNJXkbD1ywL7kLqyHZILZ9 2Psg== X-Gm-Message-State: APzg51Bt93BspT/N9VE+jzQncyeQ0ebx3Ze6cwLspPvlQTJSBfIPsJ7Q pjC0Eq9de0Mng0NDeAn9WHXMrA== X-Received: by 2002:a63:c245:: with SMTP id l5-v6mr24602920pgg.255.1537209277024; Mon, 17 Sep 2018 11:34:37 -0700 (PDT) Received: from ubuntu.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id i7-v6sm17544137pgs.17.2018.09.17.11.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Sep 2018 11:34:36 -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 v2 5/5] serial: sprd: Fix the indentation issue Date: Mon, 17 Sep 2018 11:33:44 -0700 Message-Id: <159889c1b417abcd9dc6eeffbecd0068b5b4ab2a.1537208449.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> References: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> In-Reply-To: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> References: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Make the macros' definition and code have the same correct indentation. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- 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;