From patchwork Wed Jul 13 08:47:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9227257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E34360868 for ; Wed, 13 Jul 2016 08:53:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 100B32756B for ; Wed, 13 Jul 2016 08:53:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0495527F8E; Wed, 13 Jul 2016 08:53:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 797232756B for ; Wed, 13 Jul 2016 08:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753164AbcGMIw5 (ORCPT ); Wed, 13 Jul 2016 04:52:57 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:56784 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932118AbcGMIuv (ORCPT ); Wed, 13 Jul 2016 04:50:51 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0LxfEh-1bL37Z2Y27-017FPU; Wed, 13 Jul 2016 10:49:22 +0200 From: Arnd Bergmann To: Hans Verkuil Cc: Arnd Bergmann , Mauro Carvalho Chehab , Matthias Brugger , PoChun Lin , Tiffany Lin , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] [media] mtk-vcodec: fix more type mismatches Date: Wed, 13 Jul 2016 10:47:40 +0200 Message-Id: <20160713084916.2765651-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:jzZsIALMYsHjee95px196+y4mX2U3W7Js6D76klkp/JFlqt1lUh cKAwmrVLbpqHclUP/bQwOHO8LAI2YG8H8prBJ67+Jr7A5c/ZTKuFpudy5U7HXkdeVtx9REF BaufYnj+w4Y6PjkqH50fA3Dfp9uz0WZvDnTUJMvG3Od69eQN4xHITq8DKrJ+oYsNmaEDQBu uuf2yej7a6XKzJYMq6vsA== X-UI-Out-Filterresults: notjunk:1; V01:K0:qjyBrvbOVKw=:Z6IlyU8we23qOc6bsDWmhl 47NJgT8C93hDDBW2SAATJHBhmjBGiGXaznZDfyAQ3Mjp6kN8JurpGoxN9RibE9rZgxKoSjqOr hVLTGutotuPv/YimgA1OGBvqMxwFESbCHNxjdrp1AGoIophGN0s3UWz1MjW7aJbthIGSffAfy i94JKLiA65tj4VeSdHKh2NFUHNBo3vznUyR3juOFDx8b0eYakYgvlBtqrGRYTL8LmxOag5aBe qJGKFwDbZCJb8J+4n1S1DUg9U/G8jVQWnCHLI4YJMzLD6wef51kBnv8lhbxohfv+Lf7cAzP2b NvHp7UYbY9lFWD2wB3Sf6JpMLCgf082DA28HPPUxMZIgHBRcRBLub9wnR2SgxlYwOCvGVDXCS lXXAR3SIclUA8uhxoj8z/tk8l1NJ9EPQ3sM+I3mUFceaymyMLCswjKS8cy0xfTmhbZrSRZktg nYhlb5Jgj2/Ty0VwTSX0hRQUlEEWKT+K7G2LHWriMII+Laq15ZqzQA8P/jVqnZUXUGDkAXst6 Y7XoEfeYTSXRQ8YP7Q4O4tua7AbcKJETYtifIyK1PgE5dAesqzcQsCEwb7XbDPpGdMd3+P9g1 QsTcWEPH831yO4Dhv9O+kUNleN4r+b3BcEOkr/kxSYfZkhwKze9JJLlYV2Ex9AS8cLqUrx5pj uR18lGNjCCZcBQvAAFcRYNOYNcmfAKhp7AzJXV2Qa4TnghEdh5fMeeNmBOrnwbKgRgi0= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added mtk-vcodec driver produces a number of warnings in an ARM allmodconfig build, mainly since it assumes that dma_addr_t is 32-bit wide: mtk-vcodec/venc/venc_vp8_if.c: In function 'vp8_enc_alloc_work_buf': mtk-vcodec/venc/venc_vp8_if.c:212:191: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] mtk-vcodec/venc/venc_h264_if.c: In function 'h264_enc_alloc_work_buf': mtk-vcodec/venc/venc_h264_if.c:297:190: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] This rearranges the format strings and type casts to what they should have been in order to avoid the warnings. e0f80d8d62f5 ("[media] mtk-vcodec: fix two compiler warnings") fixed some of the problems that were introduced at the same time, but missed two others. Signed-off-by: Arnd Bergmann --- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 4 ++-- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c index f4e18bb44cb9..9a600525b3c1 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c @@ -295,9 +295,9 @@ static int h264_enc_alloc_work_buf(struct venc_h264_inst *inst) wb[i].iova = inst->work_bufs[i].dma_addr; mtk_vcodec_debug(inst, - "work_buf[%d] va=0x%p iova=0x%p size=%zu", + "work_buf[%d] va=0x%p iova=%pad size=%zu", i, inst->work_bufs[i].va, - (void *)inst->work_bufs[i].dma_addr, + &inst->work_bufs[i].dma_addr, inst->work_bufs[i].size); } diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c index 5b4ef0f1740c..60bbcd2a0510 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c @@ -210,9 +210,9 @@ static int vp8_enc_alloc_work_buf(struct venc_vp8_inst *inst) wb[i].iova = inst->work_bufs[i].dma_addr; mtk_vcodec_debug(inst, - "work_bufs[%d] va=0x%p,iova=0x%p,size=%zu", + "work_bufs[%d] va=0x%p,iova=%pad,size=%zu", i, inst->work_bufs[i].va, - (void *)inst->work_bufs[i].dma_addr, + &inst->work_bufs[i].dma_addr, inst->work_bufs[i].size); }