|
From: | michael |
Subject: | Re: [Qemu-arm] [Qemu-devel] [PATCH RESEND 3/5] hw/display: QOM'ify milkymist-tmu2.c |
Date: | Mon, 09 May 2016 10:59:36 +0200 |
User-agent: | Roundcube Webmail/1.1.4 |
Am 2016-05-06 09:32, schrieb Markus Armbruster:
Peter Maydell <address@hidden> writes:On 5 May 2016 at 04:04, xiaoqiang zhao <address@hidden> wrote:* Drop the old SysBus init function and use instance_init * Move tmu2_glx_init into realize stage Signed-off-by: xiaoqiang zhao <address@hidden>Reviewed-by: Peter Maydell <address@hidden>+static void milkymist_tmu2_realize(DeviceState *dev, Error **errp) +{ + MilkymistTMU2State *s = MILKYMIST_TMU2(dev); + + if (tmu2_glx_init(s)) { + error_setg(errp, "tmu2_glx_init failed."); + } }The milkymist maintainer might have a suggestion for a more informative error message here.Also, error_setg() doesn't want the period: * The resulting message should be a single phrase, with no newline or * trailing punctuation.
Sorry, I can't think of a better description. The TMU2 code isn't my code. I had a look, but basically, it's because some glX functions might fail. But glx being not available isn't one of them because that is already checked in milkymist_tmu2_create().
-michael
[Prev in Thread] | Current Thread | [Next in Thread] |