From patchwork Fri Apr 6 14:23:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 132919 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp849893ljb; Fri, 6 Apr 2018 07:24:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JdJTb8P5TXr7vhNOjZ0wUXANwyM1DH34/b9vxMBoIlFtOd5+EGLy/8vn7T3P0EXE2KutS X-Received: by 2002:a17:902:3e5:: with SMTP id d92-v6mr28109603pld.104.1523024673478; Fri, 06 Apr 2018 07:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024673; cv=none; d=google.com; s=arc-20160816; b=bS0WcvwcL7gKZKLVXOhxO5UUt4Omd1w3wiPE6hnzXdHlMX61gcG1DRZ+cBF066B5Vn 8rfoK36xP7QFGX7GUKjLTp6UsbhRuxX7RYQs5cVvJ0GXtf4uvpnUqgjRYpCqNWVWQ7uz 2VSXZXzjS0OsmQFR3ueYZhjt0A0MROh59qapbXYr7tHPsEWkK8uzeHVPBpufsaSwgWau KMHRxtSWVLOG00Yt8JuTrYeBnCcG4yItMDzXJV4Z8a9Q0QIsu0OV7vop4Jw/0DCCNvm4 Bt3GkIZ74lxgtXvvjAbPY1nfwEoJlJxRM3zbJPlV74g5O4fdAKofotLcp3FbbwhjIixP 86AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7OY1xUltWdoflTdMia7ykmGIzaRVaqaeuwm7EhvM138=; b=1AGWYreS89xKvkWV+0jD3sgzIulegsFBrK80FOuixMgyd2QaQBuL/SdpaV2O8KODPX tYLyoK3cotG/4+u+iS+J4ra0YYNlXg5DvRv906kQzKXpKYoAa3gfXBwoVwmOHbDMudUr lfuqyrfC2T20QQouEneiVdYvlZv0xaRdrBIRAshGK9Z92BZw3yBzmozbEhM4HOcMMekw MBg2B91D2yUAvla3YGPvgWfMoslHWO2UZ6SYaH3dI1H1IH+RVcDgKihYyEZGhnkV8G2S ZHN0Y4leLePbAG8cPP1Zw14RigPwaPrHwfKyYwnCRHOeYzL8Wkr30N41Gg5DsaK0cJhA mmpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si7881457pfh.244.2018.04.06.07.24.33; Fri, 06 Apr 2018 07:24:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756355AbeDFOY3 (ORCPT + 29 others); Fri, 6 Apr 2018 10:24:29 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:47253 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756739AbeDFOXp (ORCPT ); Fri, 6 Apr 2018 10:23:45 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MNcrq-1fAWot0WN8-007HWn; Fri, 06 Apr 2018 16:23:37 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] media: platform: fsl-viu: add __iomem annotations Date: Fri, 6 Apr 2018 16:23:18 +0200 Message-Id: <20180406142336.2079928-1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ZCXNoc0VhLfwgOOnhu6JDtHRVmQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This avoids countless sparse warnings like drivers/media/platform/fsl-viu.c:1081:25: sparse: incorrect type in argument 2 (different address spaces) drivers/media/platform/fsl-viu.c:1082:25: sparse: incorrect type in argument 2 (different address spaces) Signed-off-by: Arnd Bergmann --- drivers/media/platform/fsl-viu.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) -- 2.9.0 diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 200c47c69a75..cc85620267f1 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -128,7 +128,7 @@ struct viu_dev { int dma_done; /* Hardware register area */ - struct viu_reg *vr; + struct viu_reg __iomem *vr; /* Interrupt vector */ int irq; @@ -244,7 +244,7 @@ struct viu_fmt *format_by_fourcc(int fourcc) void viu_start_dma(struct viu_dev *dev) { - struct viu_reg *vr = dev->vr; + struct viu_reg __iomem *vr = dev->vr; dev->field = 0; @@ -255,7 +255,7 @@ void viu_start_dma(struct viu_dev *dev) 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; @@ -395,7 +395,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 */ @@ -703,9 +703,9 @@ 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 *viu_reg) { - struct viu_reg *vr = viu_reg; + struct viu_reg __iomem *vr = viu_reg; out_be32(&vr->field_base_addr, reg_val.field_base_addr); out_be32(&vr->dma_inc, reg_val.dma_inc); @@ -985,9 +985,9 @@ 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 *viu_reg) { - struct viu_reg *vr = viu_reg; + struct viu_reg __iomem *vr = viu_reg; out_be32(&vr->luminance, 0x9512A254); out_be32(&vr->chroma_r, 0x03310000); @@ -1001,7 +1001,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; @@ -1032,7 +1032,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; @@ -1104,7 +1104,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; @@ -1169,7 +1169,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; @@ -1305,7 +1305,7 @@ static int viu_release(struct file *file) return 0; } -void viu_reset(struct viu_reg *reg) +void viu_reset(struct viu_reg __iomem *reg) { out_be32(®->status_cfg, 0); out_be32(®->luminance, 0x9512a254);