spi: Replace open coded variant of spi_bpw_to_bytes()
PATCH 1/1 spi: Replace open coded variant of spi_bpw_to_bytes()
__spi_validate() open codes the functionality of spi_bpw_to_bytes(). Replace the custom piece by the call to the mentioned function.
--- drivers/spi/spi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/spi/spi.c +1 -6
@@ -4222,12 +4222,7 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)* SPI transfer length should be multiple of SPI word size * where SPI word size should be power-of-two multiple. */ -if (xfer->bits_per_word <=8 ) - w_size =1 ; -else if (xfer->bits_per_word <=16 ) - w_size =2 ; -else - w_size =4 ; + w_size =spi_bpw_to_bytes (xfer->bits_per_word);/* No partial transfers accepted */ if (xfer->len % w_size)
Signature · 1 line
2.50.1
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
spi: Replace open coded variant of
spi_bpw_to_bytes()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.1
Thanks!
[1/1] spi: Replace open coded variant of spi_bpw_to_bytes()
https://git.kernel.org/broonie/spi/c/9861e15f6347
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