mbox series

[v1,0/3] spi: Add more consistency to CS handle

Message ID 20240307150256.3789138-1-andriy.shevchenko@linux.intel.com (mailing list archive)
Headers show
Series spi: Add more consistency to CS handle | expand

Message

Andy Shevchenko March 7, 2024, 3 p.m. UTC
There are the following issues with the current code:
- inconsistent use of 0xFF and -1 for invalid chip select pin
- inconsistent plain or BIT() use with a hard-to-understand comment
- wrong types used for last_cs_* fields

Fix all of these here.

Andy Shevchenko (3):
  spi: Consistently use BIT for cs_index_mask
  spi: Fix types of the last chip select storage variables
  spi: Introduce SPI_INVALID_CS and is_valid_cs()

 drivers/spi/spi.c       | 74 +++++++++++++++++++----------------------
 include/linux/spi/spi.h | 12 +++----
 2 files changed, 40 insertions(+), 46 deletions(-)

Comments

Mark Brown March 7, 2024, 5:56 p.m. UTC | #1
On Thu, 07 Mar 2024 17:00:58 +0200, Andy Shevchenko wrote:
> There are the following issues with the current code:
> - inconsistent use of 0xFF and -1 for invalid chip select pin
> - inconsistent plain or BIT() use with a hard-to-understand comment
> - wrong types used for last_cs_* fields
> 
> Fix all of these here.
> 
> [...]

Applied to

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

Thanks!

[1/3] spi: Consistently use BIT for cs_index_mask
      commit: 1209c5566f9b244bd047478b7fc90318c9a310f0
[2/3] spi: Fix types of the last chip select storage variables
      commit: 14fe5a98fb24192f73639590d9d3cdb5640d48db
[3/3] spi: Introduce SPI_INVALID_CS and is_valid_cs()
      commit: be84be4a35fa99cca7e81e6dd21516a324cca413

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