From patchwork Mon Feb 1 16:45:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8181431 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B21F3BEEE5 for ; Mon, 1 Feb 2016 16:46:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC4512039E for ; Mon, 1 Feb 2016 16:46:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F39D520375 for ; Mon, 1 Feb 2016 16:46:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753461AbcBAQqP (ORCPT ); Mon, 1 Feb 2016 11:46:15 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:60229 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752870AbcBAQqO (ORCPT ); Mon, 1 Feb 2016 11:46:14 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MSFaB-1aW9Iz37cp-00TSpB; Mon, 01 Feb 2016 17:45:42 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Guennadi Liakhovetski , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] [media] mx3_camera: use %pad format string for dma_ddr_t Date: Mon, 01 Feb 2016 17:45:39 +0100 Message-ID: <1527735.0V0q3NFh2C@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:I3H179J83e+PdVTQ5T+8D3U5PmIfSI+XCcH9VEMs6wuSHjEcmhN dyJxy1T/PY2GUB4e/xwojrVXoUimMumF9agmXPAGCSv4J8S9ZpjjcnuXdbJf4UxGINsYSSa rRnAsT2L0ySC3Aw7enVB1TfTcvf5NOr4yJNv4dmqBhTTYC4yML4GFPmrnjfsZtw+9EFW9B6 uf//z3J28bhpQQm2fR04g== X-UI-Out-Filterresults: notjunk:1; V01:K0:Es9SOoip3Bg=:ll0a0WFfwQvC/4CwkKVcFI P0wrI2CjD8r/pePoOTCAgQokUNEYz3B68Q+nZl/PWWruh8SK8uHm6X34RVOspXFK+PUvNPpkO du+N60NGDeG3T9oepuvcYzJTO9DCp3vQMtnt+Z9aWio0lfkxvcfSx4/55jsEkJmzgaDr/kVEV Rkl7nVTiOCAHNvkMTpRRUOMh3kQanGbeJ4uScyrXFt6gUIpZ4g+G+8DI1ZC5u5pnp2ig4qwhC hbLpj4rLD76IlI3MgjMqSY1K1R5vcC48XO4hoV4lHoZ5IY8cN6cU0Vb7lGKS9FYle9NKJWahJ A58BXDKw0A05a0iaISGAZihN1TIxGIr04mBQEcd3roxbFkzWgUHrVZp3Ub2eHZWlZ0+XeltEe qcumC5r5HDwcXSL/CKaz08HaqeCP2KuFbDo/kf7cktDgbj7y83WeIngbZ2ug0KZUPmVqTomQX T+ng1hBWLes8YA105GLa8DnyMOOzMgrUjDFa6+2ufHmlrQGiWqfLT4ofRAxr1os7H0fzyDaAC PDh02R+rlharI4CGKqYb31GO+c3QwVm33SZLVXdDUvCNkRsFCylshKnRKNk3Xk/SQ7S4HgRDk 4F8H+n/K54V2Ih8+KeVNu8JSw5yYBDsrvnEJwKhaHHf3hn1lyub3Ckv4Ef+Kb8ixQ1yjJeq7Y 1KybRKrspbKt3WWQX5KwzSDw6kysxAVOta1xYb4B/AKoMG5ZAlEqK/ss9wb2Nd5l1T39WGPzu iQBVjfPJvNG6f999 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 The mx3_camera driver prints DMA addresses using the "%x" format string, which is wrong when using a 64-bit dma_addr_t definition: media/platform/soc_camera/mx3_camera.c: In function 'mx3_cam_dma_done': media/platform/soc_camera/mx3_camera.c:149:125: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] media/platform/soc_camera/mx3_camera.c: In function 'mx3_videobuf_queue': media/platform/soc_camera/mx3_camera.c:317:119: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] media/platform/soc_camera/mx3_camera.c: In function 'mx3_videobuf_release': media/platform/soc_camera/mx3_camera.c:346:119: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] This changes the code to use the special %pad format string, which always does the right thing. Signed-off-by: Arnd Bergmann --- Another old bug that only rarely shows up in ARM randconfigs. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 169ed1150226..aa39e9569b1a 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c @@ -146,8 +146,8 @@ static void mx3_cam_dma_done(void *arg) struct idmac_channel *ichannel = to_idmac_chan(chan); struct mx3_camera_dev *mx3_cam = ichannel->client; - dev_dbg(chan->device->dev, "callback cookie %d, active DMA 0x%08x\n", - desc->txd.cookie, mx3_cam->active ? sg_dma_address(&mx3_cam->active->sg) : 0); + dev_dbg(chan->device->dev, "callback cookie %d, active DMA %pad\n", + desc->txd.cookie, mx3_cam->active ? &sg_dma_address(&mx3_cam->active->sg) : NULL); spin_lock(&mx3_cam->lock); if (mx3_cam->active) { @@ -314,8 +314,8 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb) spin_unlock_irq(&mx3_cam->lock); cookie = txd->tx_submit(txd); - dev_dbg(icd->parent, "Submitted cookie %d DMA 0x%08x\n", - cookie, sg_dma_address(&buf->sg)); + dev_dbg(icd->parent, "Submitted cookie %d DMA %pad\n", + cookie, &sg_dma_address(&buf->sg)); if (cookie >= 0) return; @@ -344,8 +344,8 @@ static void mx3_videobuf_release(struct vb2_buffer *vb) unsigned long flags; dev_dbg(icd->parent, - "Release%s DMA 0x%08x, queue %sempty\n", - mx3_cam->active == buf ? " active" : "", sg_dma_address(&buf->sg), + "Release%s DMA %pad, queue %sempty\n", + mx3_cam->active == buf ? " active" : "", &sg_dma_address(&buf->sg), list_empty(&buf->queue) ? "" : "not "); spin_lock_irqsave(&mx3_cam->lock, flags);