diff mbox series

[v1,1/7] spi: Use SPI_MODE_X_MASK

Message ID 20210510131217.49357-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/7] spi: Use SPI_MODE_X_MASK | expand

Commit Message

Andy Shevchenko May 10, 2021, 1:12 p.m. UTC
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(-)

Comments

Mark Brown May 11, 2021, 6:21 p.m. UTC | #1
On Mon, 10 May 2021 16:12:11 +0300, Andy Shevchenko wrote:
> Use SPI_MODE_X_MASK instead of open coded variant.
> 
> While at it, fix format specifier and drop explicit casting.

Applied to

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

Thanks!

[1/7] spi: Use SPI_MODE_X_MASK
      commit: 40b82c2d9a78593201a3a62dc9239d6405334561
[2/7] spi: spidev: Use SPI_MODE_X_MASK
      commit: dd507b5ec7ba44ab51e1a8404d04e815a91b472f
[3/7] spi: npcm-pspi: Use SPI_MODE_X_MASK
      commit: 56f47edf33fb55ab9381f61d60cf34c7578f3d75
[4/7] spi: oc-tiny: Use SPI_MODE_X_MASK
      commit: a2f2db6b2a8708f6ac592a362e34fb330f874cea
[5/7] spi: omap-uwire: Use SPI_MODE_X_MASK
      commit: fdb217a38808e041f6eca8c550f1b5981e401a45
[6/7] spi: ppc4xx: Use SPI_MODE_X_MASK
      commit: 4ccf05579b9d0f15443a0edc860e2be7472ccfc1
[7/7] spi: uniphier: Use SPI_MODE_X_MASK
      commit: 038b9de42269f33aca3e3741214c863a4e9328d0

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
diff mbox series

Patch

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, " : "",