Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH] firmware: arm_scmi: Use {get,put}_unaligned_le32 accessors | Date | Wed, 7 Aug 2019 15:18:59 +0000 |
| |
From: Sudeep Holla > Sent: 07 August 2019 14:01 > > Instead of type-casting the {tx,rx}.buf all over the place while > accessing them to read/write __le32 from/to the firmware, let's use > the nice existing {get,put}_unaligned_le32 accessors to hide all the > type cast ugliness.
Why the 'unaligned' accessors?
> - *(__le32 *)t->tx.buf = cpu_to_le32(id); > + put_unaligned_le32(id, t->tx.buf);
These will be expensive if the cpu doesn't support them.
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |