Thanks Andreas,
On 14/11/2025 13:15, Andreas Kemnade wrote:
> On Thu, 13 Nov 2025 10:55:39 +0200
> Matti Vaittinen <matti.vaittinen@linux.dev> wrote:
>
>> As a side note, we can reduce the "wasted space / member / instance" from
>> 3 bytes to 1 byte, by using u16 instead of the unsigned int if needed. I
>> rather use unsigned int to be initially prepared for devices with 32 bit
>> registers if there is no need to count bytes.
>
> Well, this is totally internal to the module, so no ABI/API changes, so
> there is no advantage of using 32bit now I think. We can switch any time.
The only advantage is to avoid the churn if 32bit ICs are to be added.
> But we have 32bit stuff in the regmap cache anyways, so that is not above
> the general level of wasting space.
Exactly. And, I am not sure if sparing ~hundred bytes is worth the
hassle - even if it is hassle internal to the driver. But yeah, we can
squeeze a few bytes if it is seen beneficial. That's why I mentioned it
here :)
Yours,
-- Matti
---
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~