Received: by 10.213.65.68 with SMTP id h4csp699627imn; Fri, 6 Apr 2018 07:29:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/K8lhB22sCp+uu1ExNWamlrZGlUKBqeC9gkdupI4VNtJjsbedjZupgt/sIA+ks6pMrLSkK X-Received: by 2002:a17:902:ba81:: with SMTP id k1-v6mr27886234pls.170.1523024977052; Fri, 06 Apr 2018 07:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024977; cv=none; d=google.com; s=arc-20160816; b=l8u1e/8pt5Thzny/NtlK0DeyA7CkYb3HoftMNKeiMP9tdloh/YyUCDV2QqaNurHpym rmfkXu1dWZoQt9dgF+yaI2zjApRUCIgPTOEkUpbEOf8KDujkHrgZcIw9k3cK9wlWFELT 1AZ5/sumr8BSuouOnTPWqrcBtjD+K0+gGVQQY+S1VwUtm3rYLqOju9PUfI4RkVKQAK5z jbA2FvC04vTExOxDXXXnz3oB0SHHbVftiqyJe0vtuHbwaIBI8EEuSQU5GuwNKngCJ44a Sw9B10Nh4gJ6ccCZLStznrUvOREQVDihyv3tHwXtFwP30/CImOJpt0N9SSv3atHGqGe2 +tiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=0hSWi6NiyfMrsQbPUAWBZ59JCCwnfaosP0a5+51ePq4=; b=yREfwUf4+FlGUyfAoZc7afq+FLrYhGHr9dcZsVwqXmZR83WBFNCtWnesGvr664AHh6 dJEWdXcwoM3u6QjT97c4Lu/DV9ujkD9YHitPtvGi7elVVrpFhlnQXPehBI/d6qKmO4nq vkdEDwV+k4o32Qc3NhTxq3tOqcO1NVPdBcuyZk6NR5iiyg9qFcBQUtMm8YPtMr+yCn98 WI55+7IkCCySS9Y2qZXXqAQfPdnOWQgwut1V6iPFTotp+k+ps+vMxilXlDG2/uGxrvN5 Ju4nU/8p9KM9Jf7ZYSLuYdIUzeope6y9pQyShly/UeWQkJ3OWMGpMUzfLhA646JtBk03 qUCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=R9qgygZM; 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 31-v6si8349096plz.467.2018.04.06.07.29.22; Fri, 06 Apr 2018 07:29:37 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=R9qgygZM; 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 S932225AbeDFO2R (ORCPT + 99 others); Fri, 6 Apr 2018 10:28:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57646 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932090AbeDFO2M (ORCPT ); Fri, 6 Apr 2018 10:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0hSWi6NiyfMrsQbPUAWBZ59JCCwnfaosP0a5+51ePq4=; b=R9qgygZMGENSmT2C+Pll/BqIU fuk7gY0+F2hZxlLGfxL2KBznAaJAd6nVj2J4Mk/mj2eiu/pfxutuVkW/+VQNSYzVnwjRWTakaUH8o NeJuzZX6myCuW7c9v586oDO9mIEFVvRlXq6GkFcFATglhPyvIlc9k+HDcWYSCl9i9O1jWuylfKn7s MLVWKYDnDKuMvIJfImmjpVpLbFxzXPTmiAb2gwKD/FHNyxId1nspBNA4Fs2SywquAU+NEYnyfLqYy iwjbEVRsODP6BzbQe+48lXB5PCT84mphtIrdg3LcWnD2kCYi+NQM4J5BRcm7rUXD1QgFMWZnqwrFz 7xyJP+B2g==; Received: from 177.17.251.195.dynamic.adsl.gvt.net.br ([177.17.251.195] helo=vento.lan) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4SLa-00045f-B0; Fri, 06 Apr 2018 14:28:10 +0000 Date: Fri, 6 Apr 2018 11:28:06 -0300 From: Mauro Carvalho Chehab To: Arnd Bergmann Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] media: platform: fsl-viu: add __iomem annotations Message-ID: <20180406112806.3b52e5d8@vento.lan> In-Reply-To: <20180406142336.2079928-1-arnd@arndb.de> References: <20180406142336.2079928-1-arnd@arndb.de> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 6 Apr 2018 16:23:18 +0200 Arnd Bergmann escreveu: > 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) Heh, that's almost identical to this one: https://git.linuxtv.org/mchehab/experimental.git/commit/?h=compile_test&id=457312e30430e83f9dc4bf1804acb15b91e5dfc1 > > Signed-off-by: Arnd Bergmann > --- > drivers/media/platform/fsl-viu.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > 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); Thanks, Mauro