diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-02-14 11:34:50 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-14 14:27:58 +0100 |
commit | 9d77522b45246c3dc5950b9641aea49ce3c973d7 (patch) | |
tree | 4b27e9f633ec4a540531f3618f126bb18f3537d4 /drivers/spi/spi.c | |
parent | MAINTAINERS: Remove file reference for Broadcom Broadband SoC HS SPI driver e... (diff) | |
download | linux-9d77522b45246c3dc5950b9641aea49ce3c973d7.tar.xz linux-9d77522b45246c3dc5950b9641aea49ce3c973d7.zip |
spi: Reorder fields in 'struct spi_transfer'
Group some variables based on their sizes to reduce hole and avoid padding.
On x86_64, this shrinks the size from 144 to 128 bytes.
Turn 'timestamped' into a bitfield so that it can be easily merged with
some other bifields and move 'error'.
This should have no real impact on memory allocation because 'struct
spi_transfer' is mostly used on stack, but it can save a few cycles
when the structure is initialized or copied.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/93a051da85a895bc6003aedfb00a13e1c2fc6338.1676370870.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 91f71305817b..5866bf5813a4 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1927,7 +1927,7 @@ void spi_take_timestamp_post(struct spi_controller *ctlr, /* Capture the resolution of the timestamp */ xfer->ptp_sts_word_post = progress; - xfer->timestamped = true; + xfer->timestamped = 1; } EXPORT_SYMBOL_GPL(spi_take_timestamp_post); |