Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbbDIXUR (ORCPT ); Thu, 9 Apr 2015 19:20:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58978 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbbDIXUO (ORCPT ); Thu, 9 Apr 2015 19:20:14 -0400 From: Mitchel Humpherys To: Colin Cross Cc: devel@linuxdriverproject.org, Greg Kroah-Hartman , Android Kernel Team , John Stultz , lkml Subject: Re: [PATCH] staging: ion: chunk_heap: use %pa for printing dma_addr_t's References: <1428618674-1370-1-git-send-email-mitchelh@codeaurora.org> Date: Thu, 09 Apr 2015 16:20:13 -0700 In-Reply-To: (Colin Cross's message of "Thu, 9 Apr 2015 15:48:55 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1490 Lines: 33 On Thu, Apr 09 2015 at 03:48:55 PM, Colin Cross wrote: > On Thu, Apr 9, 2015 at 3:31 PM, Mitchel Humpherys > wrote: >> We're currently using %lu and %ld to print some variables of type >> dma_addr_t, which results in the following warning when dma_addr_t is >> 64-bits wide: >> >> drivers/staging/android/ion/ion_chunk_heap.c: In function 'ion_chunk_heap_create': >> drivers/staging/android/ion/ion_chunk_heap.c:176:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat=] >> pr_info("%s: base %lu size %zu align %ld\n", __func__, chunk_heap->base, >> ^ >> drivers/staging/android/ion/ion_chunk_heap.c:176:2: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'dma_addr_t' [-Wformat=] >> >> Fix this by using %pa as instructed in printk-formats.txt. > > According to printk-formats.txt, dma_addr_t needs to be printed with %pad. Ah good catch. I'll send a v2. I need to check printk-formats.txt more often... :) -Mitch -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/