Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B52CC7EE2F for ; Mon, 27 Feb 2023 06:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbjB0GDg (ORCPT ); Mon, 27 Feb 2023 01:03:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbjB0GDY (ORCPT ); Mon, 27 Feb 2023 01:03:24 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8205CE050 for ; Sun, 26 Feb 2023 22:03:14 -0800 (PST) Received: from workpc.. (109-252-117-89.nat.spd-mgts.ru [109.252.117.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id D67176602E52; Mon, 27 Feb 2023 06:03:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677477793; bh=kSakoXUglyl/y87Gkd3ABWuXpWvJ9Z8kIhJnjOMedVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AwsZeqDin8Oo3gx+Qlpbw40+FTFZK+yD1pQmpfxYAmt8n1rpnUPvU2xatDZGBLhkM 0Fj8jOdOmkHqE5CwwVrNUONXXOGLm/DLoa8QAFLZJB+jr/eOy1VH02B9WKX6gDjbGQ hiWivZTrUdMD/Qtxp/+7fESKwd3juw1YK1FEu89RBbvTUUFHg6smG6U2JGmlOMeSH8 umntaAU/xGVCxZAYk8rJcHarn9Z2DZOFtMS10p9mSmSRaDjlsjFTf1Xf6hJu9U2y2r T4L85TyRjZDKIFZEtHeTXdiMu3HDrxsZpio6gDePBHWa3zF7RtnM3p1XQ0KQ3T+j3r hXpPPzH9ZcmXA== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gustavo Padovan , Daniel Stone , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Qiang Yu , Steven Price , Alyssa Rosenzweig , Rob Herring Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org Subject: [PATCH v11 06/10] drm/shmem-helper: Remove obsoleted is_iomem test Date: Mon, 27 Feb 2023 09:02:15 +0300 Message-Id: <20230227060219.904986-7-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230227060219.904986-1-dmitry.osipenko@collabora.com> References: <20230227060219.904986-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Everything that uses the mapped buffer should by agnostic to is_iomem. The only reason for the is_iomem test is is that we're setting shmem->vaddr to the returned map->vaddr. Now that the shmem->vaddr code is gone, remove the obsoleted is_iomem test to clean up the code. Suggested-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 56de12bb28b1..ba1db7c5659c 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -409,12 +409,6 @@ int drm_gem_shmem_vmap(struct drm_gem_shmem_object *shmem, if (obj->import_attach) { ret = dma_buf_vmap(obj->import_attach->dmabuf, map); - if (!ret) { - if (drm_WARN_ON(obj->dev, map->is_iomem)) { - dma_buf_vunmap(obj->import_attach->dmabuf, map); - return -EIO; - } - } } else { pgprot_t prot = PAGE_KERNEL; -- 2.39.2