HomeFreeBSD

rk_i2c_transfer: minor improvement to bit twiddling

Description

rk_i2c_transfer: minor improvement to bit twiddling

No need to mask a uint8_t with 0xff, the mask covers the whole type.
Explcitly cast to uint32_t before bit shifting instead of relying on
the implicit promotion to signed int.

(cherry picked from commit 25e92673b54ea3b66cbaf53826cfd01df3441ea3)

Details

Provenance
avgAuthored on Dec 15 2021, 9:11 AM
Parents
rG9a95029ea797: rk_i2c: do not hide NACK condition from consumers
Branches
Unknown
Tags
Unknown