[PATCH v3 1/4] firmware: arm_scmi: Add optional flags to extended names helper

andy.shevchenko at gmail.com andy.shevchenko at gmail.com
Tue Jun 6 23:33:23 PDT 2023


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





More information about the linux-arm-kernel mailing list