[PATCH v1 0/2] spi: Introduce and use spi_bpw_to_bytes()

Andy Shevchenko posted 2 patches 8 months, 1 week ago
There is a newer version of this series
drivers/spi/spi-dw-core.c |  2 +-
drivers/spi/spi.c         |  2 +-
include/linux/spi/spi.h   | 15 +++++++++++++++
3 files changed, 17 insertions(+), 2 deletions(-)
[PATCH v1 0/2] spi: Introduce and use spi_bpw_to_bytes()
Posted by Andy Shevchenko 8 months, 1 week ago
Recently in the discussion with David the idea of having
a common helper popped up. The helper converts the given
bits per word to bytes. The result will always be power-of-two
(e.g. for 37 bits it returns 8 bytes) or 0 for 0 input.

This mini-series introduces it and replaces current users
under drivers/spi and we expect more (and possibly some lurking
in other subsystems).

Mark, if you okay with the idea, please, make this to be an immutable
branch or tag for others to pull.

Andy Shevchenko (2):
  spi: Add spi_bpw_to_bytes() helper and use it
  spi: dw: Use spi_bpw_to_bytes() helper

 drivers/spi/spi-dw-core.c |  2 +-
 drivers/spi/spi.c         |  2 +-
 include/linux/spi/spi.h   | 15 +++++++++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)

-- 
2.47.2
Re: [PATCH v1 0/2] spi: Introduce and use spi_bpw_to_bytes()
Posted by Mark Brown 8 months ago
On Wed, 16 Apr 2025 09:16:33 +0300, Andy Shevchenko wrote:
> Recently in the discussion with David the idea of having
> a common helper popped up. The helper converts the given
> bits per word to bytes. The result will always be power-of-two
> (e.g. for 37 bits it returns 8 bytes) or 0 for 0 input.
> 
> This mini-series introduces it and replaces current users
> under drivers/spi and we expect more (and possibly some lurking
> in other subsystems).
> 
> [...]

Applied to

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

Thanks!

[1/2] spi: Add spi_bpw_to_bytes() helper and use it
      commit: 163ddf1fea590229c30a8dc4c29ff4febfb895c3
[2/2] spi: dw: Use spi_bpw_to_bytes() helper
      commit: e30b7a75666b3f444abfabed6a144642fa9994d8

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