diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-02-28 15:43:08 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-05 23:41:25 +0000 |
commit | fc12d4bb3227f21e1e7d6d78231074ca542c060d (patch) | |
tree | 9d9837893a359ec9ccaab9107533f574fc99445b /include/linux/fpga/fpga-mgr.h | |
parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) |
spi: Replace spi_pcpu_stats_totalize() macro by a C function
spi_pcpu_stats_totalize() is a rather large macro, and is instantiated
28 times, causing a large amount of duplication in the amount of
generated code.
Reduce the duplication by replacing spi_pcpu_stats_totalize() by a real
C function, and absorb all other common code from
spi_statistics_##name##_show(). As (a) the old "field" parameter was
the name of a structure member, which cannot be passed to a function,
and (b) passing a pointer to the member is also not an option, due to
the loop over all possible CPUs, the "field" parameter is replaced by an
"offset" parameter, pointing to a location within the structure.
This reduces kernel size by ca. 4 KiB (on arm32 and arm64).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/cb7690d9d04c06eec23dbb98fbb5444082125cff.1677594432.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions