linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] spi: pl022: clean up some unused variables
@ 2023-12-11 12:49 Nam Cao
  2023-12-11 12:49 ` [PATCH 1/2] spi: pl022: delete unused cur_gpiod in struct pl022 Nam Cao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nam Cao @ 2023-12-11 12:49 UTC (permalink / raw)
  To: linus.walleij, broonie, linux-arm-kernel, linux-spi, linux-kernel; +Cc: Nam Cao

The driver was refactored in 9b2ef250b31d ("spi: spl022: switch to use
default spi_transfer_one_message()"), and some variables are now unused
because of that. Clean them up.

Nam Cao (2):
  spi: pl022: delete unused cur_gpiod in struct pl022
  spi: pl022: delete unused next_msg_cs_active in struct pl022

 drivers/spi/spi-pl022.c | 9 ---------
 1 file changed, 9 deletions(-)

-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] spi: pl022: delete unused cur_gpiod in struct pl022
  2023-12-11 12:49 [PATCH 0/2] spi: pl022: clean up some unused variables Nam Cao
@ 2023-12-11 12:49 ` Nam Cao
  2023-12-11 12:49 ` [PATCH 2/2] spi: pl022: delete unused next_msg_cs_active " Nam Cao
  2023-12-12 15:46 ` [PATCH 0/2] spi: pl022: clean up some unused variables Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Nam Cao @ 2023-12-11 12:49 UTC (permalink / raw)
  To: linus.walleij, broonie, linux-arm-kernel, linux-spi, linux-kernel; +Cc: Nam Cao

The member cur_gpiod of struct pl022 is not used anywhere. Delete it.

Signed-off-by: Nam Cao <namcao@linutronix.de>
---
 drivers/spi/spi-pl022.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 1e3bd6f3303a..fd21e83cc3a4 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -361,7 +361,6 @@ struct vendor_data {
  * @dummypage: a dummy page used for driving data on the bus with DMA
  * @dma_running: indicates whether DMA is in operation
  * @cur_cs: current chip select index
- * @cur_gpiod: current chip select GPIO descriptor
  */
 struct pl022 {
 	struct amba_device		*adev;
@@ -393,7 +392,6 @@ struct pl022 {
 	bool				dma_running;
 #endif
 	int cur_cs;
-	struct gpio_desc *cur_gpiod;
 };
 
 /**
@@ -1344,8 +1342,6 @@ static int pl022_transfer_one(struct spi_controller *host, struct spi_device *sp
 	/* Setup the SPI using the per chip configuration */
 	pl022->cur_chip = spi_get_ctldata(spi);
 	pl022->cur_cs = spi_get_chipselect(spi, 0);
-	/* This is always available but may be set to -ENOENT */
-	pl022->cur_gpiod = spi_get_csgpiod(spi, 0);
 
 	restore_state(pl022);
 	flush(pl022);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] spi: pl022: delete unused next_msg_cs_active in struct pl022
  2023-12-11 12:49 [PATCH 0/2] spi: pl022: clean up some unused variables Nam Cao
  2023-12-11 12:49 ` [PATCH 1/2] spi: pl022: delete unused cur_gpiod in struct pl022 Nam Cao
@ 2023-12-11 12:49 ` Nam Cao
  2023-12-12 15:46 ` [PATCH 0/2] spi: pl022: clean up some unused variables Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Nam Cao @ 2023-12-11 12:49 UTC (permalink / raw)
  To: linus.walleij, broonie, linux-arm-kernel, linux-spi, linux-kernel; +Cc: Nam Cao

The member next_msg_cs_active of struct pl022 is not used anywhere.
Delete it.

Signed-off-by: Nam Cao <namcao@linutronix.de>
---
 drivers/spi/spi-pl022.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index fd21e83cc3a4..3baf45da01cd 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -341,10 +341,6 @@ struct vendor_data {
  * @cur_msg: Pointer to current spi_message being processed
  * @cur_transfer: Pointer to current spi_transfer
  * @cur_chip: pointer to current clients chip(assigned from controller_state)
- * @next_msg_cs_active: the next message in the queue has been examined
- *  and it was found that it uses the same chip select as the previous
- *  message, so we left it active after the previous transfer, and it's
- *  active already.
  * @tx: current position in TX buffer to be read
  * @tx_end: end position in TX buffer to be read
  * @rx: current position in RX buffer to be written
@@ -372,7 +368,6 @@ struct pl022 {
 	struct pl022_ssp_controller	*host_info;
 	struct spi_transfer		*cur_transfer;
 	struct chip_data		*cur_chip;
-	bool				next_msg_cs_active;
 	void				*tx;
 	void				*tx_end;
 	void				*rx;
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] spi: pl022: clean up some unused variables
  2023-12-11 12:49 [PATCH 0/2] spi: pl022: clean up some unused variables Nam Cao
  2023-12-11 12:49 ` [PATCH 1/2] spi: pl022: delete unused cur_gpiod in struct pl022 Nam Cao
  2023-12-11 12:49 ` [PATCH 2/2] spi: pl022: delete unused next_msg_cs_active " Nam Cao
@ 2023-12-12 15:46 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-12-12 15:46 UTC (permalink / raw)
  To: linus.walleij, linux-arm-kernel, linux-spi, linux-kernel, Nam Cao

On Mon, 11 Dec 2023 13:49:13 +0100, Nam Cao wrote:
> The driver was refactored in 9b2ef250b31d ("spi: spl022: switch to use
> default spi_transfer_one_message()"), and some variables are now unused
> because of that. Clean them up.
> 
> Nam Cao (2):
>   spi: pl022: delete unused cur_gpiod in struct pl022
>   spi: pl022: delete unused next_msg_cs_active in struct pl022
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: pl022: delete unused cur_gpiod in struct pl022
      commit: 4c6dd33de9d3148909bc403d394f527bec4aec27
[2/2] spi: pl022: delete unused next_msg_cs_active in struct pl022
      commit: 3c49d848d2d3c6fe46522e4d750fc3a18e699997

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-12 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-11 12:49 [PATCH 0/2] spi: pl022: clean up some unused variables Nam Cao
2023-12-11 12:49 ` [PATCH 1/2] spi: pl022: delete unused cur_gpiod in struct pl022 Nam Cao
2023-12-11 12:49 ` [PATCH 2/2] spi: pl022: delete unused next_msg_cs_active " Nam Cao
2023-12-12 15:46 ` [PATCH 0/2] spi: pl022: clean up some unused variables 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).