Message ID | 20200213234148.8434-3-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/hppa/dino: Fix Coverity 1419393 & 1419394 | expand |
On 14.02.20 00:41, Philippe Mathieu-Daudé wrote: > > Fixes: Covertiy CID 1419393 and 1419394 (commit 18092598a5) > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Helge Deller <deller@gmx.de> > --- > hw/hppa/dino.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c > index c237ad3b1b..8868e31793 100644 > --- a/hw/hppa/dino.c > +++ b/hw/hppa/dino.c > @@ -83,7 +83,7 @@ > #define DINO_PCI_HOST_BRIDGE(obj) \ > OBJECT_CHECK(DinoState, (obj), TYPE_DINO_PCI_HOST_BRIDGE) > > -#define DINO800_REGS ((DINO_TLTIM - DINO_GMASK) / 4) > +#define DINO800_REGS (1 + (DINO_TLTIM - DINO_GMASK) / 4) > static const uint32_t reg800_keep_bits[DINO800_REGS] = { > MAKE_64BIT_MASK(0, 1), /* GMASK */ > MAKE_64BIT_MASK(0, 7), /* PAMR */ > @@ -96,6 +96,7 @@ static const uint32_t reg800_keep_bits[DINO800_REGS] = { > MAKE_64BIT_MASK(0, 30), /* BRDG_FEAT */ > MAKE_64BIT_MASK(0, 25), /* PCIROR */ > MAKE_64BIT_MASK(0, 22), /* PCIWOR */ > + MAKE_64BIT_MASK(0, 32), /* Undocumented */ > MAKE_64BIT_MASK(0, 9), /* TLTIM */ > }; > >
On Thu, 13 Feb 2020 at 23:44, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > Fixes: Covertiy CID 1419393 and 1419394 (commit 18092598a5) > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> I think this also fixes CID 1419387 ? thanks -- PMM
On Mon, Feb 17, 2020 at 6:37 PM Peter Maydell <peter.maydell@linaro.org> wrote: > On Thu, 13 Feb 2020 at 23:44, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > > > Fixes: Covertiy CID 1419393 and 1419394 (commit 18092598a5) > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > > I think this also fixes CID 1419387 ? Ah I missed this one, indeed it does. > thanks > -- PMM
On Tue, Feb 18, 2020 at 7:19 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > On Mon, Feb 17, 2020 at 6:37 PM Peter Maydell <peter.maydell@linaro.org> wrote: > > On Thu, 13 Feb 2020 at 23:44, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > > > > > > Fixes: Covertiy CID 1419393 and 1419394 (commit 18092598a5) > > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > > > > I think this also fixes CID 1419387 ? > > Ah I missed this one, indeed it does. The description is erroneous, I'll respin. > > > thanks > > -- PMM
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index c237ad3b1b..8868e31793 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -83,7 +83,7 @@ #define DINO_PCI_HOST_BRIDGE(obj) \ OBJECT_CHECK(DinoState, (obj), TYPE_DINO_PCI_HOST_BRIDGE) -#define DINO800_REGS ((DINO_TLTIM - DINO_GMASK) / 4) +#define DINO800_REGS (1 + (DINO_TLTIM - DINO_GMASK) / 4) static const uint32_t reg800_keep_bits[DINO800_REGS] = { MAKE_64BIT_MASK(0, 1), /* GMASK */ MAKE_64BIT_MASK(0, 7), /* PAMR */ @@ -96,6 +96,7 @@ static const uint32_t reg800_keep_bits[DINO800_REGS] = { MAKE_64BIT_MASK(0, 30), /* BRDG_FEAT */ MAKE_64BIT_MASK(0, 25), /* PCIROR */ MAKE_64BIT_MASK(0, 22), /* PCIWOR */ + MAKE_64BIT_MASK(0, 32), /* Undocumented */ MAKE_64BIT_MASK(0, 9), /* TLTIM */ };