Marek Vasut [mailto:ma...@denx.de]
> Sent: Friday, June 12, 2020 7:53 PM
[...]
> Try this:
> 
>       ocp_data = r8152_efuse_read(tp, 0x7d);
>       ocp_data = (ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7);
>       if (data != 0xffff)
>               ocp_reg_write(tp, OCP_ADC_IOFFSET, data);

I think you mean

        ocp_data = r8152_efuse_read(tp, 0x7d);
        ocp_data = ((ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7);
        if (ocp_data != 0xffff)
                ocp_reg_write(tp, OCP_ADC_IOFFSET, ocp_data);

> That should work, no ? Or does it generate compiler warnings ?

It shows no warning.

Best Regards,
Hayes

Reply via email to