From patchwork Fri Apr 6 14:23:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10326759 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 634CB6053F for ; Fri, 6 Apr 2018 14:23:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 558762953A for ; Fri, 6 Apr 2018 14:23:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A18929540; Fri, 6 Apr 2018 14:23:42 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 D5FD42953A for ; Fri, 6 Apr 2018 14:23:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756755AbeDFOXk (ORCPT ); Fri, 6 Apr 2018 10:23:40 -0400 Received: from osg.samsung.com ([64.30.133.232]:56616 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755126AbeDFOXj (ORCPT ); Fri, 6 Apr 2018 10:23:39 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 852AE32D6C; Fri, 6 Apr 2018 07:23:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9g9zSit0ySNu; Fri, 6 Apr 2018 07:23:38 -0700 (PDT) Received: from smtp.s-opensource.com (177.17.251.195.dynamic.adsl.gvt.net.br [177.17.251.195]) by osg.samsung.com (Postfix) with ESMTPSA id D303732C7B; Fri, 6 Apr 2018 07:23:26 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f4SGy-0008Ya-Qh; Fri, 06 Apr 2018 10:23:24 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Al Viro , Bhumika Goyal , "Lad, Prabhakar" , Geliang Tang , Kees Cook Subject: [PATCH 20/21] media: fsl-viu: fix __iomem annotations Date: Fri, 6 Apr 2018 10:23:21 -0400 Message-Id: <457312e30430e83f9dc4bf1804acb15b91e5dfc1.1523024380.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) 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 Those annotations are wrong, causing this warning: drivers/media/platform/fsl-viu.c:1440:21: warning: incorrect type in assignment (different address spaces) drivers/media/platform/fsl-viu.c:1440:21: expected struct viu_reg *vr drivers/media/platform/fsl-viu.c:1440:21: got struct viu_reg [noderef] *[assigned] viu_regs Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/fsl-viu.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 4ca060ee8c08..5b6bfcafc2a4 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -134,7 +134,7 @@ struct viu_dev { int dma_done; /* Hardware register area */ - struct viu_reg *vr; + struct viu_reg __iomem *vr; /* Interrupt vector */ int irq; @@ -250,7 +250,7 @@ static struct viu_fmt *format_by_fourcc(int fourcc) static void viu_start_dma(struct viu_dev *dev) { - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; dev->field = 0; @@ -261,7 +261,7 @@ static void viu_start_dma(struct viu_dev *dev) static void viu_stop_dma(struct viu_dev *dev) { - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; int cnt = 100; u32 status_cfg; @@ -401,7 +401,7 @@ static void free_buffer(struct videobuf_queue *vq, struct viu_buf *buf) inline int buffer_activate(struct viu_dev *dev, struct viu_buf *buf) { - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; int bpp; /* setup the DMA base address */ @@ -706,10 +706,8 @@ static int verify_preview(struct viu_dev *dev, struct v4l2_window *win) return 0; } -inline void viu_activate_overlay(struct viu_reg *viu_reg) +inline void viu_activate_overlay(struct viu_reg __iomem *vr) { - struct viu_reg *vr = viu_reg; - out_be32(&vr->field_base_addr, reg_val.field_base_addr); out_be32(&vr->dma_inc, reg_val.dma_inc); out_be32(&vr->picture_count, reg_val.picture_count); @@ -988,10 +986,8 @@ inline void viu_activate_next_buf(struct viu_dev *dev, } } -inline void viu_default_settings(struct viu_reg *viu_reg) +inline void viu_default_settings(struct viu_reg __iomem *vr) { - struct viu_reg *vr = viu_reg; - out_be32(&vr->luminance, 0x9512A254); out_be32(&vr->chroma_r, 0x03310000); out_be32(&vr->chroma_g, 0x06600F38); @@ -1004,7 +1000,7 @@ inline void viu_default_settings(struct viu_reg *viu_reg) static void viu_overlay_intr(struct viu_dev *dev, u32 status) { - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; if (status & INT_DMA_END_STATUS) dev->dma_done = 1; @@ -1035,7 +1031,7 @@ static void viu_overlay_intr(struct viu_dev *dev, u32 status) static void viu_capture_intr(struct viu_dev *dev, u32 status) { struct viu_dmaqueue *vidq = &dev->vidq; - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; struct viu_buf *buf; int field_num; int need_two; @@ -1107,7 +1103,7 @@ static void viu_capture_intr(struct viu_dev *dev, u32 status) static irqreturn_t viu_intr(int irq, void *dev_id) { struct viu_dev *dev = (struct viu_dev *)dev_id; - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; u32 status; u32 error; @@ -1172,7 +1168,7 @@ static int viu_open(struct file *file) struct video_device *vdev = video_devdata(file); struct viu_dev *dev = video_get_drvdata(vdev); struct viu_fh *fh; - struct viu_reg *vr; + struct viu_reg __iomem *vr; int minor = vdev->minor; u32 status_cfg; @@ -1306,7 +1302,7 @@ static int viu_release(struct file *file) return 0; } -static void viu_reset(struct viu_reg *reg) +static void viu_reset(struct viu_reg __iomem *reg) { out_be32(®->status_cfg, 0); out_be32(®->luminance, 0x9512a254);