From: Jaewon Kim <jaewon02.kim@gmail.com>
To: Mark Brown <broonie@kernel.org>, Jaewon Kim <jaewon02.kim@samsung.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: dw: fix buffer end address
Date: Tue, 30 Oct 2018 01:35:15 +0900 [thread overview]
Message-ID: <762bc63e-7b01-0d77-3939-7b236dbda37f@gmail.com> (raw)
In-Reply-To: <1540395437-6623-1-git-send-email-jaewon02.kim@samsung.com>
There is some side effect on this patch.
So, I revoke this patch.
18. 10. 25. 오전 12:37에 Jaewon Kim 이(가) 쓴 글:
> Buffer address can be NULL, if user does not want to receive TX/RX data.
> In this case, driver should not set the rx/tx_end value with len.
>
> Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
> ---
> drivers/spi/spi-dw.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
> index b705f2b..34e6fca 100644
> --- a/drivers/spi/spi-dw.c
> +++ b/drivers/spi/spi-dw.c
> @@ -293,9 +293,13 @@ static int dw_spi_transfer_one(struct spi_controller *master,
> dws->dma_mapped = 0;
>
> dws->tx = (void *)transfer->tx_buf;
> - dws->tx_end = dws->tx + transfer->len;
> + dws->tx_end = dws->tx;
> + if (dws->tx)
> + dws->tx_end += transfer->len;
> dws->rx = transfer->rx_buf;
> - dws->rx_end = dws->rx + transfer->len;
> + dws->rx_end = dws->rx;
> + if (dws->rx)
> + dws->rx_end += transfer->len;
> dws->len = transfer->len;
>
> spi_enable_chip(dws, 0);
prev parent reply other threads:[~2018-10-29 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 15:37 [PATCH] spi: dw: fix buffer end address Jaewon Kim
2018-10-29 16:35 ` Jaewon Kim [this message]
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=762bc63e-7b01-0d77-3939-7b236dbda37f@gmail.com \
--to=jaewon02.kim@gmail.com \
--cc=broonie@kernel.org \
--cc=jaewon02.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/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).