public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Inki Dae <inki.dae@samsung.com>
Subject: [PATCH v3 3/3] serial: samsung: Remove useless spinlock
Date: Mon, 03 Apr 2017 08:21:01 +0200	[thread overview]
Message-ID: <1491200468-28463-3-git-send-email-m.szyprowski@samsung.com> (raw)
In-Reply-To: <1491200468-28463-1-git-send-email-m.szyprowski@samsung.com>

Spinlock taken only for dma_map_single() for TX buffer is completely
useless and doesn't protect anything, so remove it to simplify the code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/tty/serial/samsung.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index ca0bcd7fd61f..8aca18c4cdea 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -906,13 +906,9 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p)
 		goto err_free_rx;
 	}
 
-	spin_lock_irqsave(&p->port.lock, flags);
-
 	/* TX buffer */
 	dma->tx_addr = dma_map_single(p->port.dev, p->port.state->xmit.buf,
 				UART_XMIT_SIZE, DMA_TO_DEVICE);
-
-	spin_unlock_irqrestore(&p->port.lock, flags);
 	if (dma_mapping_error(p->port.dev, dma->tx_addr)) {
 		ret = -EIO;
 		goto err_unmap_rx;
-- 
1.9.1

  parent reply	other threads:[~2017-04-03  6:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170403062115eucas1p25b1504b3441f1195129bbedad261494c@eucas1p2.samsung.com>
2017-04-03  6:20 ` [PATCH v3 1/3] serial: samsung: Use right device for DMA-mapping calls Marek Szyprowski
2017-04-03  6:21   ` [PATCH v3 2/3] serial: samsung: Add missing checks for dma_map_single failure Marek Szyprowski
2017-04-03 13:50     ` Shuah Khan
2017-04-04  9:36     ` Krzysztof Kozlowski
2017-04-03  6:21   ` Marek Szyprowski [this message]
2017-04-04  9:36     ` [PATCH v3 3/3] serial: samsung: Remove useless spinlock Krzysztof Kozlowski
2017-04-03 13:42   ` [PATCH v3 1/3] serial: samsung: Use right device for DMA-mapping calls Shuah Khan

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=1491200468-28463-3-git-send-email-m.szyprowski@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sw0312.kim@samsung.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