From patchwork Mon Nov 18 10:35:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11249381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E44F930 for ; Mon, 18 Nov 2019 10:36:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4710E20726 for ; Mon, 18 Nov 2019 10:36:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4710E20726 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCAEC6E3C7; Mon, 18 Nov 2019 10:36:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D6F16E30E for ; Mon, 18 Nov 2019 10:36:00 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id u18so16813924wmc.3 for ; Mon, 18 Nov 2019 02:36:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jjDLxOz7IsbnL7t2/1Ejysn56H4IEYN8ktzvCCiHtFg=; b=athOIc3w5R1g3ceO6fdEEimIzs3nG/5CCRnZOFFq7/UQ2V98tcBqBGW2BVFCEBxviF Sat2JKBNYU/jVy1nxytG3DzbpRDzU4DiNVpExtyR4CSyQrv6DaEkCVdbJpsrlRn1TU6k PwVVW9inB7DYT6jqeSaXQRItF+XmriL14UzOCESBJxQc04UWn6PsGw4cliBX9PwiqP2Q RMZgnxSKz2MtpHo3IZ4vkDhVsCFG492CUX8BNZS1L6BvIkIusN4SmTUhnFm1rLu/iRFp lwMBpc2GW+UWKPT11Ch1ziRWhevTlmil/mqidERJQHITc6ycXUnMVz0ynIUWRJ4WN362 Io/g== X-Gm-Message-State: APjAAAU1v+fZ8zT0RuiMqYmmZWWEj+oJX9hzKqxl0RiOfq4EjORbKGVW t+I16Sz9qVZ9YcFmJ+2+onNyclfgOTE= X-Google-Smtp-Source: APXvYqxuf8Z1g6JRhix6c1l9qTmhAZvxcDDPcHNmw/YqNTYy8nEysXzPhnZ/YuoW4u1Ee+f/OudQtQ== X-Received: by 2002:a7b:c255:: with SMTP id b21mr29898342wmj.39.1574073358651; Mon, 18 Nov 2019 02:35:58 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id j2sm22749200wrt.61.2019.11.18.02.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 02:35:58 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 13/15] xen/gntdev-dmabuf: Ditch dummy map functions Date: Mon, 18 Nov 2019 11:35:34 +0100 Message-Id: <20191118103536.17675-14-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191118103536.17675-1-daniel.vetter@ffwll.ch> References: <20191118103536.17675-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jjDLxOz7IsbnL7t2/1Ejysn56H4IEYN8ktzvCCiHtFg=; b=BXixQVq2k/7tC9dPX/bMsg1etG8/LX8ir3zvqVJdCRc9RkrCObDs6PrdHtTu/EuVbP kXNiyijwPNqrzOCCwygOzMmden/lVtzOEhP5DGJclsF+p6uup6MP4o7LzYQxt9v+bRE7 Fh9x2wWvTXXnQf3phCJdqLRs5xDWQ/1s4FmnE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Daniel Vetter , Intel Graphics Development , xen-devel@lists.xenproject.org, Daniel Vetter , Boris Ostrovsky Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There's no in-kernel users for the k(un)map stuff. And the mmap one is actively harmful - return 0 and then _not_ actually mmaping can't end well. Signed-off-by: Daniel Vetter Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Juergen Gross --- Ack for merging this through drm trees very much appreciated. -Daniel --- drivers/xen/gntdev-dmabuf.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c index 2c4f324f8626..fe7bd69d6955 100644 --- a/drivers/xen/gntdev-dmabuf.c +++ b/drivers/xen/gntdev-dmabuf.c @@ -342,35 +342,12 @@ static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) mutex_unlock(&priv->lock); } -static void *dmabuf_exp_ops_kmap(struct dma_buf *dma_buf, - unsigned long page_num) -{ - /* Not implemented. */ - return NULL; -} - -static void dmabuf_exp_ops_kunmap(struct dma_buf *dma_buf, - unsigned long page_num, void *addr) -{ - /* Not implemented. */ -} - -static int dmabuf_exp_ops_mmap(struct dma_buf *dma_buf, - struct vm_area_struct *vma) -{ - /* Not implemented. */ - return 0; -} - static const struct dma_buf_ops dmabuf_exp_ops = { .attach = dmabuf_exp_ops_attach, .detach = dmabuf_exp_ops_detach, .map_dma_buf = dmabuf_exp_ops_map_dma_buf, .unmap_dma_buf = dmabuf_exp_ops_unmap_dma_buf, .release = dmabuf_exp_ops_release, - .map = dmabuf_exp_ops_kmap, - .unmap = dmabuf_exp_ops_kunmap, - .mmap = dmabuf_exp_ops_mmap, }; struct gntdev_dmabuf_export_args {