From patchwork Fri Mar 16 13:50:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 7333 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DACF923E29 for ; Fri, 16 Mar 2012 13:50:33 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9712CA1829D for ; Fri, 16 Mar 2012 13:50:33 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so7270323iag.11 for ; Fri, 16 Mar 2012 06:50:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :subject:date:message-id:x-mailer:x-gm-message-state; bh=JqR0hPo3okuhWofgVkTTD+EmnF9NuSEX0LSto4YJkOU=; b=OXIqeNdNWci4kil5+BZLOu58dyJTN8R3E1G4GML+nx9MePqQRuev7tjOBs1qvNFL/m arZDTSphxEx5YJ+tffwK/LNjKWB6JIm0S+IeNV0mhAr5ge/yOxH0NQTwMGMSYhNsZRlA 7qJLErO2gNgChMxHd9uiDSkns3whcSPi42ZkM6h2Q2zMekJYvT/FoDEfiNA0ZcgG0amq 8ADWcrCPaq+/ckGyrHqU/c4alEtytprUx8DghRaMXwsVvoR1sCZ9/msNQsCzBbe5ftDS WldIX284K6CLTctDD8GU8mMR0+jkdtCA92FNWsvjUXA4WWy1fZ14E+hopI+AShNzkCLm 9C8w== Received: by 10.50.197.132 with SMTP id iu4mr2446836igc.74.1331905833113; Fri, 16 Mar 2012 06:50:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp8580ibg; Fri, 16 Mar 2012 06:50:32 -0700 (PDT) Received: by 10.180.82.136 with SMTP id i8mr6672132wiy.19.1331905827814; Fri, 16 Mar 2012 06:50:27 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id y43si5941109weq.58.2012.03.16.06.50.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Mar 2012 06:50:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1S8XY1-0002wG-LO for patches@linaro.org; Fri, 16 Mar 2012 13:50:25 +0000 From: Peter Maydell To: patches@linaro.org Subject: [PATCH] hw/qxl.c: Fix compilation failures on 32 bit hosts Date: Fri, 16 Mar 2012 13:50:25 +0000 Message-Id: <1331905825-11272-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQk7My/nqui159ihdfSTdycrnxbmG3XW0AFK32I/YcgnXQxGggLj148o0npeyR0TsqHIrZ9O Fix compilation failures on 32 bit hosts (cast from pointer to integer of different size; %ld expects 'long int' not uint64_t). Reported-by: Steve Langasek Signed-off-by: Peter Maydell --- hw/qxl.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index e17b0e3..47dc383 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -149,7 +149,7 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id, } else { assert(cookie != NULL); spice_qxl_update_area_async(&qxl->ssd.qxl, surface_id, area, - clear_dirty_region, (uint64_t)cookie); + clear_dirty_region, (uintptr_t)cookie); } } @@ -171,7 +171,7 @@ static void qxl_spice_destroy_surface_wait(PCIQXLDevice *qxl, uint32_t id, cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO, QXL_IO_DESTROY_SURFACE_ASYNC); cookie->u.surface_id = id; - spice_qxl_destroy_surface_async(&qxl->ssd.qxl, id, (uint64_t)cookie); + spice_qxl_destroy_surface_async(&qxl->ssd.qxl, id, (uintptr_t)cookie); } else { qxl->ssd.worker->destroy_surface_wait(qxl->ssd.worker, id); qxl_spice_destroy_surface_wait_complete(qxl, id); @@ -181,8 +181,8 @@ static void qxl_spice_destroy_surface_wait(PCIQXLDevice *qxl, uint32_t id, static void qxl_spice_flush_surfaces_async(PCIQXLDevice *qxl) { spice_qxl_flush_surfaces_async(&qxl->ssd.qxl, - (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO, - QXL_IO_FLUSH_SURFACES_ASYNC)); + (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO, + QXL_IO_FLUSH_SURFACES_ASYNC)); } void qxl_spice_loadvm_commands(PCIQXLDevice *qxl, struct QXLCommandExt *ext, @@ -213,8 +213,8 @@ static void qxl_spice_destroy_surfaces(PCIQXLDevice *qxl, qxl_async_io async) { if (async) { spice_qxl_destroy_surfaces_async(&qxl->ssd.qxl, - (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO, - QXL_IO_DESTROY_ALL_SURFACES_ASYNC)); + (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO, + QXL_IO_DESTROY_ALL_SURFACES_ASYNC)); } else { qxl->ssd.worker->destroy_surfaces(qxl->ssd.worker); qxl_spice_destroy_surfaces_complete(qxl); @@ -743,7 +743,7 @@ static void interface_async_complete_io(PCIQXLDevice *qxl, QXLCookie *cookie) } if (cookie && current_async != cookie->io) { fprintf(stderr, - "qxl: %s: error: current_async = %d != %ld = cookie->io\n", + "qxl: %s: error: current_async = %d != %" PRId64 " = cookie->io\n", __func__, current_async, cookie->io); } switch (current_async) { @@ -812,7 +812,7 @@ static void interface_update_area_complete(QXLInstance *sin, static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token) { PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); - QXLCookie *cookie = (QXLCookie *)cookie_token; + QXLCookie *cookie = (QXLCookie *)(uintptr_t)cookie_token; switch (cookie->type) { case QXL_COOKIE_TYPE_IO: