Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cef1ed9c authored by Nicolas Iooss's avatar Nicolas Iooss Committed by Brian Norris
Browse files

mtd: r852: make ecc_reg 32-bit in r852_ecc_correct



r852_ecc_correct() reads a 32-bit register into a 16-bit variable,
ecc_reg, but this variable is later used as if it was larger.  This is
reported by clang when building the kernel with many warnings:

    drivers/mtd/nand/r852.c:512:11: error: shift count >= width of type
    [-Werror,-Wshift-count-overflow]
                    ecc_reg >>= 16;
                            ^   ~~
Fix this by making ecc_reg 32-bit, like the return type of
r852_read_reg_dword().

Signed-off-by: default avatarNicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent a11244c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment