spi: Fix types of the last chip select storage variables
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 Mar 2024 15:01:00 +0000 (17:01 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 7 Mar 2024 15:07:10 +0000 (15:07 +0000)
commit14fe5a98fb24192f73639590d9d3cdb5640d48db
treef0c70aa36bf609db22e5f9d948194cce8ef9fbaf
parent1209c5566f9b244bd047478b7fc90318c9a310f0
spi: Fix types of the last chip select storage variables

First of all, last_cs_index_mask should be aligned with the original
cs_index_mask, which is 16-bit (for now) wide. Use the same pattern
for the last_cs_index_mask.

Second, last_cs can be negative and since 'char' is equal to 'unsigned
char' in the kernel, it's incorrect, strictly speaking, to assign
signed number to it. Use s8 type as it's done for *_native_cs ones.

With this change, regroup a bit the ordering to avoid too much memory
space to be wasted due to paddings. Shuffle kernel documentation
accordignly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240307150256.3789138-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/spi/spi.h