From: David Jander <david@protonic.nl>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
Andrew Lunn <andrew@lunn.ch>, David Jander <david@protonic.nl>
Subject: [RFC] [PATCH v2 07/11] spi: Remove the now unused ctlr->idling flag
Date: Wed, 15 Jun 2022 14:46:30 +0200 [thread overview]
Message-ID: <20220615124634.3302867-8-david@protonic.nl> (raw)
In-Reply-To: <20220615124634.3302867-1-david@protonic.nl>
The ctlr->idling flag is never checked now, so we don't need to set it
either.
Signed-off-by: David Jander <david@protonic.nl>
---
drivers/spi/spi.c | 2 --
include/linux/spi/spi.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 71b767a9ad77..52736e339645 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1674,7 +1674,6 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
}
ctlr->busy = false;
- ctlr->idling = true;
spin_unlock_irqrestore(&ctlr->queue_lock, flags);
kfree(ctlr->dummy_rx);
@@ -1689,7 +1688,6 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
trace_spi_controller_idle(ctlr);
spin_lock_irqsave(&ctlr->queue_lock, flags);
- ctlr->idling = false;
ctlr->queue_empty = true;
goto out_unlock;
}
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 74261a83b5fa..c58f46be762f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -383,7 +383,6 @@ extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 ch
* @pump_messages: work struct for scheduling work to the message pump
* @queue_lock: spinlock to syncronise access to message queue
* @queue: message queue
- * @idling: the device is entering idle state
* @cur_msg: the currently in-flight message
* @cur_msg_mapped: message has been mapped for DMA
* @last_cs: the last chip_select that is recorded by set_cs, -1 on non chip
@@ -616,7 +615,6 @@ struct spi_controller {
spinlock_t queue_lock;
struct list_head queue;
struct spi_message *cur_msg;
- bool idling;
bool busy;
bool running;
bool rt;
--
2.32.0
next prev parent reply other threads:[~2022-06-15 12:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 12:46 [RFC] [PATCH v2 00/11] Optimize spi_sync path David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 01/11] spi: Move ctlr->cur_msg_prepared to struct spi_message David Jander
2022-06-15 12:46 ` [FRC] [PATCH v2 02/11] spi: Don't use the message queue if possible in spi_sync David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 03/11] spi: Lock controller idling transition inside the io_mutex David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 04/11] spi: __spi_pump_messages: Consolidate spin_unlocks to goto target David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 05/11] spi: Remove check for controller idling in spi sync path David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 06/11] spi: Remove check for idling in __spi_pump_messages() David Jander
2022-06-15 12:46 ` David Jander [this message]
2022-06-15 12:46 ` [RFC] [PATCH 08/11] spi: Remove unneeded READ_ONCE for ctlr->busy flag David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 09/11] spi: Set ctlr->cur_msg also in the sync transfer case David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 10/11] spi: Ensure the io_mutex is held until spi_finalize_current_message() David Jander
2022-06-15 12:46 ` [RFC] [PATCH v2 11/11] spi: opportunistically skip ctlr->cur_msg_completion David Jander
2022-06-15 13:31 ` [RFC] [PATCH v2 00/11] Optimize spi_sync path Marc Kleine-Budde
2022-06-15 14:13 ` David Jander
2022-06-20 18:15 ` Mark Brown
2022-06-21 6:15 ` David Jander
2022-06-16 13:22 ` Mark Brown
2022-06-16 14:13 ` David Jander
2022-06-16 14:55 ` Mark Brown
2022-06-16 15:30 ` David Jander
2022-06-17 12:08 ` David Jander
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=20220615124634.3302867-8-david@protonic.nl \
--to=david@protonic.nl \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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).