From: Marek Vasut Date: Wed, 10 Jun 2020 14:54:13 +0200 Subject: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B In-Reply-To: <581ab1fe517047fb8624bf22ac46151c@realtek.com> References: <1394712342-15778-377-Taiwan-albertk@realtek.com> <1394712342-15778-381-Taiwan-albertk@realtek.com> <78409d87-514d-1321-76de-a3b5161086a7@denx.de> <581ab1fe517047fb8624bf22ac46151c@realtek.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 6/10/20 2:44 PM, Hayes Wang wrote: > Marek Vasut [mailto:marex at denx.de] >> Sent: Tuesday, June 09, 2020 10:27 PM > [...] >>> + /* ADC Bias Calibration: >>> + * read efuse offset 0x7d to get a 17-bit data. Remove the dummy/fake >>> + * bit (bit3) to rebuild the real 16-bit data. Write the data to the >>> + * ADC ioffset. >>> + */ >>> + ocp_data = r8152_efuse_read(tp, 0x7d); >>> + data = (u16)(((ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7)); >> >> Are these type casts really needed ? > > Is there not a warning from u32 to u16? There is, but it seems justified to warn about conversion from u32 to u16, so maybe that needs to be fixed ?