From patchwork Tue Apr 8 20:49:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3950981 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 63BCA9F499 for ; Tue, 8 Apr 2014 20:50:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DC80204D2 for ; Tue, 8 Apr 2014 20:50:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A00DC2049E for ; Tue, 8 Apr 2014 20:50:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F5866E86E; Tue, 8 Apr 2014 13:50:36 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) by gabe.freedesktop.org (Postfix) with ESMTP id A366A6E866 for ; Tue, 8 Apr 2014 13:50:35 -0700 (PDT) Received: by mail-bk0-f51.google.com with SMTP id 6so1266255bkj.24 for ; Tue, 08 Apr 2014 13:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=CKXebshAN8MxCrKCgo8g/EqkbmV+fSY+u9EO81eFLcE=; b=Ml9Nw5DhCYT+RfisEC/VUZ4wVgvDycqwNYyXFvN0J5UuIgejSaGo5IQQGizkt68mQb e1Dv2VPPLSxzkzia/wVQyFbMAWP/f9lWth8hQcT1Z6w4jUANbWoHhzgUTvDCYVN5Hhno BlWU47sSqbj7nlG3M7NheipP9mdyS1JFjffxwTSZJzrSGGNfpERBbYzJ2vjZZ0WKYj1n SlaimdJvYpgqMeuNClLeNu9YtJaB6X5fJdZ7O41K69Wrxo2VFr8C5my5OlG4ITnKqBWr lPxSo6Il7f/S9wFXPjYEYzL7OrHE3ttAv8bE5ROnO3s2fSLF+ORbzkeHQVTErnlHpUPO P2rQ== X-Received: by 10.204.167.199 with SMTP id r7mr293734bky.63.1396990234338; Tue, 08 Apr 2014 13:50:34 -0700 (PDT) Received: from localhost (port-92459.pppoe.wtnet.de. [84.46.73.165]) by mx.google.com with ESMTPSA id ci7sm3746323bkc.0.2014.04.08.13.50.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Apr 2014 13:50:33 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/4] intel: Fix some format strings Date: Tue, 8 Apr 2014 22:49:36 +0200 Message-Id: <1396990178-32470-3-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396990178-32470-1-git-send-email-thierry.reding@gmail.com> References: <1396990178-32470-1-git-send-email-thierry.reding@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Some of the format strings for debug messages use the wrong modifier to print sizes. Signed-off-by: Thierry Reding --- intel/intel_bufmgr_fake.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c index d9b5cfdc8952..d63fc815cf9c 100644 --- a/intel/intel_bufmgr_fake.c +++ b/intel/intel_bufmgr_fake.c @@ -505,7 +505,7 @@ alloc_backing_store(drm_intel_bo *bo) bo_fake->backing_store = malloc(bo->size); - DBG("alloc_backing - buf %d %p %d\n", bo_fake->id, + DBG("alloc_backing - buf %d %p %lu\n", bo_fake->id, bo_fake->backing_store, bo->size); assert(bo_fake->backing_store); } @@ -716,7 +716,7 @@ evict_and_alloc_block(drm_intel_bo *bo) if (alloc_block(bo)) return 1; - DBG("%s 0x%x bytes failed\n", __FUNCTION__, bo->size); + DBG("%s 0x%lx bytes failed\n", __FUNCTION__, bo->size); return 0; } @@ -835,7 +835,7 @@ drm_intel_fake_bo_alloc(drm_intel_bufmgr *bufmgr, bo_fake->flags = 0; bo_fake->is_static = 0; - DBG("drm_bo_alloc: (buf %d: %s, %d kb)\n", bo_fake->id, bo_fake->name, + DBG("drm_bo_alloc: (buf %d: %s, %lu kb)\n", bo_fake->id, bo_fake->name, bo_fake->bo.size / 1024); return &bo_fake->bo; @@ -894,7 +894,7 @@ drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr, bo_fake->flags = BM_PINNED; bo_fake->is_static = 1; - DBG("drm_bo_alloc_static: (buf %d: %s, %d kb)\n", bo_fake->id, + DBG("drm_bo_alloc_static: (buf %d: %s, %lu kb)\n", bo_fake->id, bo_fake->name, bo_fake->bo.size / 1024); return &bo_fake->bo; @@ -1022,7 +1022,7 @@ static int return 0; { - DBG("drm_bo_map: (buf %d: %s, %d kb)\n", bo_fake->id, + DBG("drm_bo_map: (buf %d: %s, %lu kb)\n", bo_fake->id, bo_fake->name, bo_fake->bo.size / 1024); if (bo->virtual != NULL) { @@ -1100,7 +1100,7 @@ static int if (--bo_fake->map_count != 0) return 0; - DBG("drm_bo_unmap: (buf %d: %s, %d kb)\n", bo_fake->id, bo_fake->name, + DBG("drm_bo_unmap: (buf %d: %s, %lu kb)\n", bo_fake->id, bo_fake->name, bo_fake->bo.size / 1024); bo->virtual = NULL; @@ -1167,7 +1167,7 @@ static int bufmgr_fake = (drm_intel_bufmgr_fake *) bo->bufmgr; - DBG("drm_bo_validate: (buf %d: %s, %d kb)\n", bo_fake->id, + DBG("drm_bo_validate: (buf %d: %s, %lu kb)\n", bo_fake->id, bo_fake->name, bo_fake->bo.size / 1024); /* Sanity check: Buffers should be unmapped before being validated. @@ -1197,7 +1197,7 @@ static int /* Upload the buffer contents if necessary */ if (bo_fake->dirty) { - DBG("Upload dirty buf %d:%s, sz %d offset 0x%x\n", bo_fake->id, + DBG("Upload dirty buf %d:%s, sz %lu offset 0x%x\n", bo_fake->id, bo_fake->name, bo->size, bo_fake->block->mem->ofs); assert(!(bo_fake->flags & (BM_NO_BACKING_STORE | BM_PINNED))); @@ -1522,12 +1522,12 @@ drm_intel_fake_check_aperture_space(drm_intel_bo ** bo_array, int count) } if (sz > bufmgr_fake->size) { - DBG("check_space: overflowed bufmgr size, %dkb vs %dkb\n", + DBG("check_space: overflowed bufmgr size, %ukb vs %lukb\n", sz / 1024, bufmgr_fake->size / 1024); return -1; } - DBG("drm_check_space: sz %dkb vs bufgr %dkb\n", sz / 1024, + DBG("drm_check_space: sz %ukb vs bufgr %lukb\n", sz / 1024, bufmgr_fake->size / 1024); return 0; }