From patchwork Wed Nov 1 14:06:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 117707 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp933498qgn; Wed, 1 Nov 2017 07:09:52 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QZ9Rbh4vC4166RE7LktDOyczPg8V6jk77Ex1Ny/CmcU3IBcia7e7D9wv9dUUtXrZjZ0N/9 X-Received: by 10.99.120.131 with SMTP id t125mr6468311pgc.81.1509545392698; Wed, 01 Nov 2017 07:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509545392; cv=none; d=google.com; s=arc-20160816; b=xmwCQp6HWna2Sm9wYgfKWciey0Z2Mc+sLnHIYMtzXCpyOEErFnTPwNZD6hwg53yLGm bDCzS4lZ5Ewp3LB8m7bgUlpoTJQWhXgme5/Ojkhrl/bnhNrn+8/3mMfwvDwdNE4K2W4i XmVvUEsKDcZjxjS8so3NKTjfp32r3DD+wh3rd/B2OOs6mzhIka9Hs2GXg+aIP+FysejW 3JzIZI3jfnZWLmApZ9ZgFZGihrk5UbowqKLa3jdoZ522TQ82gltvVLIC496IgnvM/0Zu zjHhUEEWeNurKg7LJ1odrEfnT3q9Wd2Cqm3jJin/6P7+oEBQBMmupzha2FoThcGww5yY iqiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=iirc5XtqJDwty9psPHLzdO8JHiiLcto+Hb8cQtFN+AI=; b=MX5jK7jhD1Nx1xdeQvquO6dMIuKqRSX3jEnTedMOlZl/3OYIEg8tNgjG1EJq7GvK0X aSLduI9PSjly136m+dwjcfBYfaOe3F6C5ZAl4KC+JUVDsMzuFOE1GWfl6Q6LBolbyHZJ 4308tMn4fkYBmMzGeFjjo7Dr3ncnkIExQCXg9PUb5eRP8ALdN388DtC8OTi9QJxJw6fy 0NX9mAFVCW/k+eRf73LZ4lF/UZeKz6FHZiD/wSf46Dt9s418sXyhglHcoHWRS0vx6C23 sM+vAOGep3LBspuO2UYdBRin+s/PvmT7gavHLK3rPODrBBmnLAFJYPnv91T3gvozpdQ0 igAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 65si1106237pfi.107.2017.11.01.07.09.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 07:09:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) 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 590B76E740; Wed, 1 Nov 2017 14:09:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by gabe.freedesktop.org (Postfix) with ESMTPS id A401E6E02C for ; Wed, 1 Nov 2017 14:09:49 +0000 (UTC) Received: from e110455-lin.cambridge.arm.com (e110455-lin.cambridge.arm.com [10.2.131.60]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id vA1E6Ugi029935; Wed, 1 Nov 2017 14:06:30 GMT From: Liviu Dudau To: Sumit Semwal Subject: [PATCH] dma-buf: Cleanup comments on dma_buf_map_attachment() Date: Wed, 1 Nov 2017 14:06:30 +0000 Message-Id: <20171101140630.2884-1-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.14.3 Cc: Liviu Dudau , LKML , DRI-devel , Linux Media ML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mappings need to be unmapped by calling dma_buf_unmap_attachment() and not by calling again dma_buf_map_attachment(). Also fix some spelling mistakes. Signed-off-by: Liviu Dudau Reviewed-by: Alex Deucher Reviewed-by: Christian König --- drivers/dma-buf/dma-buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index bc1cb284111cb..1792385405f0e 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -351,13 +351,13 @@ static inline int is_dma_buf_file(struct file *file) * * 2. Userspace passes this file-descriptors to all drivers it wants this buffer * to share with: First the filedescriptor is converted to a &dma_buf using - * dma_buf_get(). The the buffer is attached to the device using + * dma_buf_get(). Then the buffer is attached to the device using * dma_buf_attach(). * * Up to this stage the exporter is still free to migrate or reallocate the * backing storage. * - * 3. Once the buffer is attached to all devices userspace can inniate DMA + * 3. Once the buffer is attached to all devices userspace can initiate DMA * access to the shared buffer. In the kernel this is done by calling * dma_buf_map_attachment() and dma_buf_unmap_attachment(). * @@ -617,7 +617,7 @@ EXPORT_SYMBOL_GPL(dma_buf_detach); * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR * on error. May return -EINTR if it is interrupted by a signal. * - * A mapping must be unmapped again using dma_buf_map_attachment(). Note that + * A mapping must be unmapped by using dma_buf_unmap_attachment(). Note that * the underlying backing storage is pinned for as long as a mapping exists, * therefore users/importers should not hold onto a mapping for undue amounts of * time.