On Sat, Mar 16, 2019 at 03:23:09PM +0100, BALATON Zoltan wrote:
> On Sat, 16 Mar 2019, BALATON Zoltan wrote:
> > Version 4 try to fix an ASan warning about leaking bitbang_i2c.
> 
> I still get ASan warning but it's about gpio_i2c_init in bitbang_i2c.c which
> I haven't changed nor using so I think this is pre-existing problem in
> bitbang_i2c.c which was exposed by touching it now so I'm not trying to fix.
> (Maybe adding an exit function to free the allocated bitbang_i2c in object
> state could help but I think it still leaks the bus so I'm not sure how to
> handle it correctly. Maybe this should be QOMified somehow but cannot be a
> device because it's not connected to a bus but embedded in other device
> models.)

It can inherit from I2CBus and then specific devices could inherit from
the bitbang interface.  That's almost certainly the right way to do this,
but that design issue isn't cause by your changes.

I'll try to poke at this a bit to see if I can clean it up.

-corey

> 
> Regards,
> BALATON Zoltan
> 
> > Version 3 keeps bitbang_i2c.h and moves it to include/hw/i2c/
> > otherwise same as version 2.
> > 
> > BALATON Zoltan (2):
> >  i2c: Move bitbang_i2c.h to include/hw/i2c/
> >  ati-vga: Implement DDC and EDID info from monitor
> > 
> > hw/display/Kconfig                   |  2 ++
> > hw/display/ati.c                     | 44 
> > ++++++++++++++++++++++++++++++++++--
> > hw/display/ati_int.h                 |  4 ++++
> > hw/display/ati_regs.h                |  1 +
> > hw/i2c/bitbang_i2c.c                 |  2 +-
> > hw/i2c/ppc4xx_i2c.c                  |  1 -
> > hw/i2c/versatile_i2c.c               |  2 +-
> > {hw => include/hw}/i2c/bitbang_i2c.h |  2 ++
> > include/hw/i2c/i2c.h                 |  2 --
> > include/hw/i2c/ppc4xx_i2c.h          |  2 +-
> > 10 files changed, 54 insertions(+), 8 deletions(-)
> > rename {hw => include/hw}/i2c/bitbang_i2c.h (80%)
> > 
> > 

Reply via email to