Re: [GIT PULL] regmap updates for v6.1
From: Linus Torvalds
Date: Tue Oct 04 2022 - 22:27:45 EST
I've pulled this, but...
On Mon, Oct 3, 2022 at 5:46 AM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> Andy Shevchenko (11):
> swab: Add array operations
I wish people didn't add pointless inline functions to core headers
for things that just aren't that important or common.
Partly because it just makes compiles slower. But partly because I
think the code generation is questionable too. Does inlining really
help or matter? No.
And are these actually ever likely to have more than one or two
odd-ball users in the regmap code? No.
IOW, this would have been better off just being kept in regmap code,
and never hit a generic header file that is included by absolutely
*EVERYTHING*.
Now, if would be one thing if this was some complicated
super-optimized code that might actually matter elsewhere too. But it
*really* isn't. It's a completely trivial (and fairly bad)
implementation that is "good enough" for the one single use it has.
IOW, if we actually cared about something like swab16_array() enough
that we'd want to seriously export it, you'd do it a word at a time
(two 8-bit shifts, and a masked combining bitop).
But we clearly don't care. And for the same reason we don't care
enough to make a really fancy version of it, I don't think it should
be in a generic header file and make every build slower.
Linus