lkml.org 
[lkml]   [2023]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/4] firmware: arm_scmi: Add optional flags to extended names helper
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


\
 
 \ /
  Last update: 2023-06-07 08:35    [W:0.194 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site