Thread (15 messages) 15 messages, 2 authors, 12d ago

Re: [PATCH 2/7] i2c: nomadik: optimize layout of struct nmk_i2c_dev

From: Linus Walleij <linusw@kernel.org>
Date: 2026-06-24 22:37:13
Also in: linux-arm-kernel, linux-i2c, lkml

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
[off-list ref] 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 <redacted>
(...)
quoted hunk ↗ jump to hunk
 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@kernel.org>

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help