[PATCH 2/7] i2c: nomadik: optimize layout of struct nmk_i2c_dev
Linus Walleij
linusw at kernel.org
Wed Jun 24 15:36:49 PDT 2026
Hi Dmitry,
thanks for your patch!
Also nice to see some kernel contributions directly from
MobilEye!
On Tue, Jun 23, 2026 at 6:32 PM Dmitry Guzman
<Dmitry.Guzman at mobileye.com> wrote:
> Put two bool variables `xfer_done` and `has_32b_bus` and two char
> variables `tft` and `rft` together in order to reduce struct size
> wasted for padding.
>
> Signed-off-by: Dmitry Guzman <Dmitry.Guzman at mobileye.com>
(...)
> struct nmk_i2c_dev {
> struct i2c_vendor_data *vendor;
> @@ -206,13 +206,13 @@ struct nmk_i2c_dev {
> u32 clk_freq;
> unsigned char tft;
> unsigned char rft;
^
Maybe you want to take the opportunity to change these
two into u8 if you're anyway changing the layout of this
struct?
Either way:
Reviewed-by: Linus Walleij <linusw at kernel.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list