linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/7] spi: Use SPI_MODE_X_MASK
@ 2021-05-10 13:12 Andy Shevchenko
  2021-05-10 13:12 ` [PATCH v1 2/7] spi: spidev: " Andy Shevchenko
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Andy Shevchenko @ 2021-05-10 13:12 UTC (permalink / raw)
  To: Linus Walleij, Mark Brown, openbmc, linux-spi, linux-kernel,
	linux-arm-kernel
  Cc: Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Kunihiko Hayashi, Masami Hiramatsu,
	Andy Shevchenko

Use SPI_MODE_X_MASK instead of open coded variant.

While at it, fix format specifier and drop explicit casting.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 407420977a73..956dce3aafca 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3441,8 +3441,8 @@ int spi_setup(struct spi_device *spi)
 		spi_set_thread_rt(spi->controller);
 	}
 
-	dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s%u bits/w, %u Hz max --> %d\n",
-			(int) (spi->mode & (SPI_CPOL | SPI_CPHA)),
+	dev_dbg(&spi->dev, "setup mode %lu, %s%s%s%s%u bits/w, %u Hz max --> %d\n",
+			spi->mode & SPI_MODE_X_MASK,
 			(spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",
 			(spi->mode & SPI_LSB_FIRST) ? "lsb, " : "",
 			(spi->mode & SPI_3WIRE) ? "3wire, " : "",
-- 
2.30.2


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

end of thread, other threads:[~2021-05-11 18:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 13:12 [PATCH v1 1/7] spi: Use SPI_MODE_X_MASK Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 2/7] spi: spidev: " Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 3/7] spi: npcm-pspi: " Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 4/7] spi: oc-tiny: " Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 5/7] spi: omap-uwire: " Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 6/7] spi: ppc4xx: " Andy Shevchenko
2021-05-10 13:12 ` [PATCH v1 7/7] spi: uniphier: " Andy Shevchenko
2021-05-11 18:21 ` [PATCH v1 1/7] spi: " 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).