From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Behun Date: Tue, 16 Mar 2021 16:19:11 +0100 Subject: regmap bug fix In-Reply-To: <20210316150740.29878-1-marek.behun@nic.cz> References: <20210316135844.7fb3czkwqdkadmze@ti.com> <20210316150740.29878-1-marek.behun@nic.cz> Message-ID: <20210316161911.0fbf4d18@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Simon, Heiko, Bin, Pratyush discovered that the solution implemented by the patch regmap: fix a serious pointer casting bug is wrong. The cpu_to_le32() / le32_to_cpu() shifts data to the correct position, but on big endian machines it also reverses byte order. Somehow this went right through my head when I thought this up. I have sent a new version, with subject [PATCH u-boot v3.1 01/39] regmap: fix a serious pointer casting bug The new solution utilizes an union { u8; u16; u32; u64; }, since all members of an union start at the same address. Could you please review this? Thanks. Marek