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: 10036485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4075D602B5 for ; Wed, 1 Nov 2017 15:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F4A628C2C for ; Wed, 1 Nov 2017 15:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1422A28C58; Wed, 1 Nov 2017 15:10:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97CB728C2C for ; Wed, 1 Nov 2017 15:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754586AbdKAPKb (ORCPT ); Wed, 1 Nov 2017 11:10:31 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:56968 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754562AbdKAPKa (ORCPT ); Wed, 1 Nov 2017 11:10:30 -0400 X-Greylist: delayed 3830 seconds by postgrey-1.27 at vger.kernel.org; Wed, 01 Nov 2017 11:10:29 EDT 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 Cc: Linux Media ML , DRI-devel , LKML , Liviu Dudau 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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.