linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs()
@ 2021-04-20 13:18 Andy Shevchenko
  2021-04-22 11:18 ` Andy Shevchenko
  2021-04-26 15:09 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-04-20 13:18 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel; +Cc: Andy Shevchenko

The enable1 is confusing name. Change it to clearly show what is
the intention behind it. No functional changes.

Fixes: 25093bdeb6bc ("spi: implement SW control for CS times")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index b08efe88ccd6..74b2b1dd358b 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -797,7 +797,7 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
 
 static void spi_set_cs(struct spi_device *spi, bool enable)
 {
-	bool enable1 = enable;
+	bool activate = enable;
 
 	/*
 	 * Avoid calling into the driver (or doing delays) if the chip select
@@ -812,7 +812,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable)
 
 	if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) ||
 	    !spi->controller->set_cs_timing) {
-		if (enable1)
+		if (activate)
 			spi_delay_exec(&spi->controller->cs_setup, NULL);
 		else
 			spi_delay_exec(&spi->controller->cs_hold, NULL);
@@ -825,8 +825,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable)
 		if (!(spi->mode & SPI_NO_CS)) {
 			if (spi->cs_gpiod)
 				/* polarity handled by gpiolib */
-				gpiod_set_value_cansleep(spi->cs_gpiod,
-							 enable1);
+				gpiod_set_value_cansleep(spi->cs_gpiod, activate);
 			else
 				/*
 				 * invert the enable line, as active low is
@@ -844,7 +843,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable)
 
 	if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) ||
 	    !spi->controller->set_cs_timing) {
-		if (!enable1)
+		if (!activate)
 			spi_delay_exec(&spi->controller->cs_inactive, NULL);
 	}
 }
-- 
2.30.2


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

* Re: [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs()
  2021-04-20 13:18 [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs() Andy Shevchenko
@ 2021-04-22 11:18 ` Andy Shevchenko
  2021-04-26 15:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-04-22 11:18 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel

On Tue, Apr 20, 2021 at 04:18:46PM +0300, Andy Shevchenko wrote:
> The enable1 is confusing name. Change it to clearly show what is
> the intention behind it. No functional changes.

Is this one okay or does it require some work?


-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs()
  2021-04-20 13:18 [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs() Andy Shevchenko
  2021-04-22 11:18 ` Andy Shevchenko
@ 2021-04-26 15:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-04-26 15:09 UTC (permalink / raw)
  To: linux-kernel, Andy Shevchenko, linux-spi; +Cc: Mark Brown

On Tue, 20 Apr 2021 16:18:46 +0300, Andy Shevchenko wrote:
> The enable1 is confusing name. Change it to clearly show what is
> the intention behind it. No functional changes.

Applied to

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

Thanks!

[1/1] spi: Rename enable1 to activate in spi_set_cs()
      commit: 86527bcbc88922ea40df05d28189ee15489d2cf1

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

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

end of thread, other threads:[~2021-04-26 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 13:18 [PATCH v1 1/1] spi: Rename enable1 to activate in spi_set_cs() Andy Shevchenko
2021-04-22 11:18 ` Andy Shevchenko
2021-04-26 15:09 ` 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).