Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/44x: Fix mask and shift to zero bug

My static checker complains that 0x00001800 >> 13 is zero. Looking at
the context, it seems like a copy and paste bug from the line below
and probably 0x3 << 13 or 0x00006000 was intended.

Fixes: 2af59f7d5c3e ("[POWERPC] 4xx: Add 405GPr and 405EP support in boot wrapper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Dan Carpenter and committed by
Michael Ellerman
8d046759 c6554045

+1 -1
+1 -1
arch/powerpc/boot/4xx.c
··· 564 564 fbdv = 16; 565 565 cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */ 566 566 opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */ 567 - ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */ 567 + ppdv = ((pllmr & 0x00006000) >> 13) + 1; /* PLB:PCI */ 568 568 epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */ 569 569 udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1; 570 570