hw/ppc/ppc440_uc: Remove dead code in sdram_size()
commit09a333ee3dbbc6cdd88830f5b68dc358cacb0093
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 30 Oct 2018 17:03:53 +0000 (30 17:03 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 8 Nov 2018 01:04:40 +0000 (8 12:04 +1100)
treef347237b6dafedf89e9c6c1faff84f806c4ada21
parentbba8e23affb87622ce4a9ee3195729dbc4c3faac
hw/ppc/ppc440_uc: Remove dead code in sdram_size()

Coverity points out in CID 1390588 that the test for sh == 0
in sdram_size() can never fire, because we calculate sh with
    sh = 1024 - ((bcr >> 6) & 0x3ff);
which must result in a value between 1 and 1024 inclusive.

Without the relevant manual for the SoC, we're not completely
sure of the correct behaviour here, but we can remove the
dead code without changing how QEMU currently behaves.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc440_uc.c