qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/2] Add AT24Cxx I2C EEPROM device model


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH v2 2/2] Add AT24Cxx I2C EEPROM device model
Date: Mon, 29 Apr 2013 12:56:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2013-02-23 14:40, Andreas Färber wrote:
>> +static int at24_init(I2CSlave *i2c)
> 
> hw/i2c.c:i2c_slave_qdev_init() calls I2CSlaveClass::init only, so please
> use a realize function instead. Cf. hw/qdev-core.h.
> 
>> +{
>> +    AT24State *s = DO_UPCAST(AT24State, i2c, i2c);
>> +    unsigned int page_size;
>> +    int64_t image_size;
>> +    int device_bits;
>> +    int hi_addr_bits;
>> +    int dev_no;
>> +
>> +    assert(AT24_MAX_PAGE_LEN <= BDRV_SECTOR_SIZE);
> 
> This should instead do error_setg(errp, "...") then.

I just noticed with my latest code that the messages set via error_setg
do not make it to the terminal when initializing the device from the
command line. Known issue?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]