* [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list
@ 2014-02-05 9:47 Axel Lin
2014-02-05 17:14 ` Marek Vasut
2014-02-07 12:20 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2014-02-05 9:47 UTC (permalink / raw)
To: Mark Brown; +Cc: Marek Vasut, linux-spi-u79uwXL29TY76Z2rM5mHXA
We don't modify the list entry while iterating the transfer list.
So use list_for_each_entry instead of list_for_each_entry_safe.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-mxs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 17bb9a9..4208f24 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -370,7 +370,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
{
struct mxs_spi *spi = spi_master_get_devdata(master);
struct mxs_ssp *ssp = &spi->ssp;
- struct spi_transfer *t, *tmp_t;
+ struct spi_transfer *t;
unsigned int flag;
int status = 0;
@@ -380,7 +380,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
writel(mxs_spi_cs_to_reg(m->spi->chip_select),
ssp->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
- list_for_each_entry_safe(t, tmp_t, &m->transfers, transfer_list) {
+ list_for_each_entry(t, &m->transfers, transfer_list) {
status = mxs_spi_setup_transfer(m->spi, t);
if (status)
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list
2014-02-05 9:47 [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list Axel Lin
@ 2014-02-05 17:14 ` Marek Vasut
2014-02-07 12:20 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2014-02-05 17:14 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA
On Wednesday, February 05, 2014 at 10:47:59 AM, Axel Lin wrote:
> We don't modify the list entry while iterating the transfer list.
> So use list_for_each_entry instead of list_for_each_entry_safe.
>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
Makes sense.
Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list
2014-02-05 9:47 [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list Axel Lin
2014-02-05 17:14 ` Marek Vasut
@ 2014-02-07 12:20 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-02-07 12:20 UTC (permalink / raw)
To: Axel Lin; +Cc: Marek Vasut, linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
On Wed, Feb 05, 2014 at 05:47:59PM +0800, Axel Lin wrote:
> We don't modify the list entry while iterating the transfer list.
> So use list_for_each_entry instead of list_for_each_entry_safe.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-07 12:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 9:47 [PATCH] spi: mxs: Use list_for_each_entry to iterate over transfer list Axel Lin
2014-02-05 17:14 ` Marek Vasut
2014-02-07 12:20 ` Mark Brown
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).