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 785C8C6FA8E for ; Sun, 5 Mar 2023 22:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbjCEWMB (ORCPT ); Sun, 5 Mar 2023 17:12:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbjCEWLu (ORCPT ); Sun, 5 Mar 2023 17:11:50 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CAA2199EF for ; Sun, 5 Mar 2023 14:11:41 -0800 (PST) Received: from workpc.. (unknown [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 19D3D6602097; Sun, 5 Mar 2023 22:11:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678054299; bh=ISC36TkNc9haEWhcJAT3q9O/61C6bxozUHrOmfEIoWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SgBBunb7sVuHC+UUa8VRAEFPRU36EM+jkg1DexAKOfxPs+UEp218r+xIpSer+vxzz aEkrTpfRZ3Nn+2Ad4qud/Z8TzgXcPYPIyjspDGlzdyZLzghC+jG6R0WHurZLBSht9Q yQZY3ik0kw7nh4bkNjPGSkyEin1Y+BYbxfLmhaR8DXS3icH3M7snKksT1mOPQH0HO3 h1AqB9jhp2LLnY5YLzOmOknLfZ7nk+wC3kISK987uo7AL+mOu/Qu/xMjKW69d6J6BK qP3BBLU4CwrM2i2Wxvb/bp6afqoVNc64XXv8nrB5TKltszSDOXZv+IqRC4o460o8Dc d6iOgTgqtcnSA== 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, intel-gfx@lists.freedesktop.org Subject: [PATCH v12 07/11] drm/shmem-helper: Remove obsoleted is_iomem test Date: Mon, 6 Mar 2023 01:10:07 +0300 Message-Id: <20230305221011.1404672-8-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230305221011.1404672-1-dmitry.osipenko@collabora.com> References: <20230305221011.1404672-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 e47cc45f39a1..b814352aae33 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -432,12 +432,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