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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux