Tue, Jun 06, 2023 at 04:22:27PM +0000, Oleksii Moisieiev kirjoitti: > Some recently added SCMI protocols needs an additional flags parameter to > be able to properly configure the command used to query the extended name > of a resource. ... > put_unaligned_le32(res_id, t->tx.buf); > + if (flags) > + put_unaligned_le32(*flags, > + (u8 *)t->tx.buf + sizeof(res_id)); I believe this can be one line, esp. if the buffer is void *, you do not need an explicit casting, void * pointer arithmetics is byte-based (yes, non-standard but very widely used in the kernel). > resp = t->rx.buf; -- With Best Regards, Andy Shevchenko