[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4102ce79ef7a4f5ba819663d072bccc8@AcuMS.aculab.com>
Date: Wed, 7 Aug 2019 15:18:59 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Sudeep Holla' <sudeep.holla@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Philipp Zabel" <p.zabel@...gutronix.de>
Subject: RE: [PATCH] firmware: arm_scmi: Use {get,put}_unaligned_le32
accessors
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)
Powered by blists - more mailing lists