From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754852AbcKXC5R (ORCPT ); Wed, 23 Nov 2016 21:57:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58792 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbcKXC5Q (ORCPT ); Wed, 23 Nov 2016 21:57:16 -0500 Date: Thu, 24 Nov 2016 04:57:11 +0200 From: "Michael S. Tsirkin" To: Gerd Hoffmann Cc: Jiri Slaby , virtualization@lists.linux-foundation.org, Linux kernel mailing list , David Airlie , dri-devel@lists.freedesktop.org Subject: virtio gpu sparse warning Message-ID: <20161124045101-mutt-send-email-mst@kernel.org> References: <20161108223153-mutt-send-email-mst@kernel.org> <1478678517.2078.12.camel@redhat.com> <1479301975.25611.23.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479301975.25611.23.camel@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 24 Nov 2016 02:57:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sparse produces these warnings: drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: expected char [noderef] *screen_base drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: got void *vmap This is because the expected type is void __iomem *, while virtio gpu object is void *vmap. We could just cast the warning away but I'm not sure this is not a symptom of an actual problem. For example, might some code call iounmap on this address? -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: virtio gpu sparse warning Date: Thu, 24 Nov 2016 04:57:11 +0200 Message-ID: <20161124045101-mutt-send-email-mst@kernel.org> References: <20161108223153-mutt-send-email-mst@kernel.org> <1478678517.2078.12.camel@redhat.com> <1479301975.25611.23.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1479301975.25611.23.camel@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Gerd Hoffmann Cc: David Airlie , Jiri Slaby , Linux kernel mailing list , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org sparse produces these warnings: drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: expected char [noderef] *screen_base drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: got void *vmap This is because the expected type is void __iomem *, while virtio gpu object is void *vmap. We could just cast the warning away but I'm not sure this is not a symptom of an actual problem. For example, might some code call iounmap on this address? -- MST