Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-13 Thread Philippe Mathieu-Daudé
On 7/13/20 12:31 PM, Peter Maydell wrote: > On Mon, 13 Jul 2020 at 11:21, Philippe Mathieu-Daudé wrote: >> >> On 7/13/20 12:05 PM, Peter Maydell wrote: >>> On Mon, 13 Jul 2020 at 09:57, Philippe Mathieu-Daudé >>> wrote: Why not make it a generic container in the MachineState and create

Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-13 Thread Peter Maydell
On Mon, 13 Jul 2020 at 11:21, Philippe Mathieu-Daudé wrote: > > On 7/13/20 12:05 PM, Peter Maydell wrote: > > On Mon, 13 Jul 2020 at 09:57, Philippe Mathieu-Daudé > > wrote: > >> Why not make it a generic container in the MachineState and create > >> the container in

Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-13 Thread Philippe Mathieu-Daudé
On 7/13/20 12:05 PM, Peter Maydell wrote: > On Mon, 13 Jul 2020 at 09:57, Philippe Mathieu-Daudé wrote: >> Why not make it a generic container in the MachineState and create >> the container in hw/core/machine.c::machine_initfn()? > > I don't think we create containers like that for any other >

Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-13 Thread Peter Maydell
On Mon, 13 Jul 2020 at 09:57, Philippe Mathieu-Daudé wrote: > Why not make it a generic container in the MachineState and create > the container in hw/core/machine.c::machine_initfn()? I don't think we create containers like that for any other machine, do we? thanks -- PMM

Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-13 Thread Philippe Mathieu-Daudé
Hi Peter, On 6/28/20 11:42 PM, Peter Maydell wrote: > Replace the free-floating set of IRQs and palmte_onoff_gpios() > function with a simple QOM device that encapsulates this > behaviour. > > This fixes Coverity issue CID 1421944, which points out that > the memory returned by

Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device

2020-07-11 Thread Li Qiang
Peter Maydell 于2020年6月29日周一 上午5:43写道: > > Replace the free-floating set of IRQs and palmte_onoff_gpios() > function with a simple QOM device that encapsulates this > behaviour. > > This fixes Coverity issue CID 1421944, which points out that > the memory returned by qemu_allocate_irqs() is