linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
To: broonie@kernel.org
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	michal.simek@xilinx.com, sgoud@xilinx.com, nagasure@xilinx.com,
	Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
Subject: [PATCH 3/3] spi: spi-zynqmp-gqspi: Fix incorrect indentation
Date: Wed,  9 Sep 2020 09:27:08 -0600	[thread overview]
Message-ID: <20200909152708.2767-4-amit.kumar-mahapatra@xilinx.com> (raw)
In-Reply-To: <20200909152708.2767-1-amit.kumar-mahapatra@xilinx.com>

Fixed incorrect indentation in ZynqMP qspi controller driver.

Addresses-checkpatch: "Alignment should match open parenthesis"
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
---
 drivers/spi/spi-zynqmp-gqspi.c | 46 +++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 7f57923f76ea..c8fa6ee18ae7 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -326,8 +326,8 @@ static void zynqmp_qspi_init_hw(struct zynqmp_qspi *xqspi)
                                 GQSPI_SELECT_FLASH_BUS_LOWER);
        /* Initialize DMA */
        zynqmp_gqspi_write(xqspi,
-                       GQSPI_QSPIDMA_DST_CTRL_OFST,
-                       GQSPI_QSPIDMA_DST_CTRL_RESET_VAL);
+                          GQSPI_QSPIDMA_DST_CTRL_OFST,
+                          GQSPI_QSPIDMA_DST_CTRL_RESET_VAL);

        /* Enable the GQSPI */
        zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, GQSPI_EN_MASK);
@@ -374,8 +374,8 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high)

        /* Manually start the generic FIFO command */
        zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST,
-                       zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
-                       GQSPI_CFG_START_GEN_FIFO_MASK);
+                          zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
+                          GQSPI_CFG_START_GEN_FIFO_MASK);

        timeout = jiffies + msecs_to_jiffies(1000);

@@ -384,10 +384,9 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high)
                statusreg = zynqmp_gqspi_read(xqspi, GQSPI_ISR_OFST);

                if ((statusreg & GQSPI_ISR_GENFIFOEMPTY_MASK) &&
-                       (statusreg & GQSPI_ISR_TXEMPTY_MASK))
+                   (statusreg & GQSPI_ISR_TXEMPTY_MASK))
                        break;
-               else
-                       cpu_relax();
+               cpu_relax();
        } while (!time_after_eq(jiffies, timeout));

        if (time_after_eq(jiffies, timeout))
@@ -549,7 +548,7 @@ static void zynqmp_qspi_readrxfifo(struct zynqmp_qspi *xqspi, u32 size)

        while ((count < size) && (xqspi->bytes_to_receive > 0)) {
                if (xqspi->bytes_to_receive >= 4) {
-                       (*(u32 *) xqspi->rxbuf) =
+                       (*(u32 *)xqspi->rxbuf) =
                        zynqmp_gqspi_read(xqspi, GQSPI_RXD_OFST);
                        xqspi->rxbuf += 4;
                        xqspi->bytes_to_receive -= 4;
@@ -645,14 +644,14 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)
        u32 config_reg, genfifoentry;

        dma_unmap_single(xqspi->dev, xqspi->dma_addr,
-                               xqspi->dma_rx_bytes, DMA_FROM_DEVICE);
+                        xqspi->dma_rx_bytes, DMA_FROM_DEVICE);
        xqspi->rxbuf += xqspi->dma_rx_bytes;
        xqspi->bytes_to_receive -= xqspi->dma_rx_bytes;
        xqspi->dma_rx_bytes = 0;

        /* Disabling the DMA interrupts */
        zynqmp_gqspi_write(xqspi, GQSPI_QSPIDMA_DST_I_DIS_OFST,
-                                       GQSPI_QSPIDMA_DST_I_EN_DONE_MASK);
+                          GQSPI_QSPIDMA_DST_I_EN_DONE_MASK);

        if (xqspi->bytes_to_receive > 0) {
                /* Switch to IO mode,for remaining bytes to receive */
@@ -670,14 +669,15 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)

                /* Manual start */
                zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST,
-                       (zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) |
-                       GQSPI_CFG_START_GEN_FIFO_MASK));
+                                  (zynqmp_gqspi_read(xqspi,
+                                                     GQSPI_CONFIG_OFST) |
+                                  GQSPI_CFG_START_GEN_FIFO_MASK));

                /* Enable the RX interrupts for IO mode */
                zynqmp_gqspi_write(xqspi, GQSPI_IER_OFST,
-                               GQSPI_IER_GENFIFOEMPTY_MASK |
-                               GQSPI_IER_RXNEMPTY_MASK |
-                               GQSPI_IER_RXEMPTY_MASK);
+                                  GQSPI_IER_GENFIFOEMPTY_MASK |
+                                  GQSPI_IER_RXNEMPTY_MASK |
+                                  GQSPI_IER_RXEMPTY_MASK);
        }
 }

@@ -708,7 +708,7 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
                dma_status =
                        zynqmp_gqspi_read(xqspi, GQSPI_QSPIDMA_DST_I_STS_OFST);
                zynqmp_gqspi_write(xqspi, GQSPI_QSPIDMA_DST_I_STS_OFST,
-                                                               dma_status);
+                                  dma_status);
        }

        if (mask & GQSPI_ISR_TXNOT_FULL_MASK) {
@@ -725,8 +725,8 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
                ret = IRQ_HANDLED;
        }

-       if ((xqspi->bytes_to_receive == 0) && (xqspi->bytes_to_transfer == 0)
-                       && ((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
+       if (xqspi->bytes_to_receive == 0 && xqspi->bytes_to_transfer == 0 &&
+           ((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
                zynqmp_gqspi_write(xqspi, GQSPI_IDR_OFST, GQSPI_ISR_IDR_MASK);
                complete(&xqspi->data_completion);
                ret = IRQ_HANDLED;
@@ -744,8 +744,8 @@ static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi)
        dma_addr_t addr;
        u64 dma_align =  (u64)(uintptr_t)xqspi->rxbuf;

-       if ((xqspi->bytes_to_receive < 8) ||
-               ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
+       if (xqspi->bytes_to_receive < 8 ||
+           ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
                /* Setting to IO mode */
                config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST);
                config_reg &= ~GQSPI_CFG_MODE_EN_MASK;
@@ -759,17 +759,17 @@ static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi)
        rx_bytes = (xqspi->bytes_to_receive - rx_rem);

        addr = dma_map_single(xqspi->dev, (void *)xqspi->rxbuf,
-                                               rx_bytes, DMA_FROM_DEVICE);
+                             rx_bytes, DMA_FROM_DEVICE);
        if (dma_mapping_error(xqspi->dev, addr))
                dev_err(xqspi->dev, "ERR:rxdma:memory not mapped\n");

        xqspi->dma_rx_bytes = rx_bytes;
        xqspi->dma_addr = addr;
        zynqmp_gqspi_write(xqspi, GQSPI_QSPIDMA_DST_ADDR_OFST,
-                               (u32)(addr & 0xffffffff));
+                          (u32)(addr & 0xffffffff));
        addr = ((addr >> 16) >> 16);
        zynqmp_gqspi_write(xqspi, GQSPI_QSPIDMA_DST_ADDR_MSB_OFST,
-                               ((u32)addr) & 0xfff);
+                          ((u32)addr) & 0xfff);

        /* Enabling the DMA mode */
        config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST);
--
2.17.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

  parent reply	other threads:[~2020-09-09 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 15:27 [PATCH 0/3]spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework Amit Kumar Mahapatra
2020-09-09 15:27 ` [PATCH 1/3] spi: spi-zynqmp-gqspi: Fix kernel-doc warnings Amit Kumar Mahapatra
2020-09-17 17:28   ` Mark Brown
2020-09-22 11:24     ` Michal Simek
2020-09-22 11:29       ` Mark Brown
2020-09-22 11:34         ` Michal Simek
2020-09-09 15:27 ` [PATCH 2/3] spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework Amit Kumar Mahapatra
2020-09-09 15:27 ` Amit Kumar Mahapatra [this message]
2020-09-24 12:00 ` [PATCH 0/3]spi: " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200909152708.2767-4-amit.kumar-mahapatra@xilinx.com \
    --to=amit.kumar-mahapatra@xilinx.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=nagasure@xilinx.com \
    --cc=sgoud@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).