Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp19250lql; Fri, 12 Apr 2024 02:10:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjPz183xvyrwBO/FMjFw9RQAg+4qcCkFzgnuhc84aoLc49Q27Iy5f0WHWqooip1zH7AW/8EP/cUFr8xSyKf6Te2r1H3h9BfHBxywXYIQ== X-Google-Smtp-Source: AGHT+IFMwkO59pQB+SERrLlpc6uCk/ghQNKZ1MXC8D4aOTeMp9LevLAmBaq1TSghen1i7g42+S9H X-Received: by 2002:a05:6830:1686:b0:6eb:567b:1b63 with SMTP id k6-20020a056830168600b006eb567b1b63mr2333108otr.24.1712913027508; Fri, 12 Apr 2024 02:10:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712913027; cv=pass; d=google.com; s=arc-20160816; b=NM1EITfkYY57m7oqhSQomAa1je7rKj0G+p/GvBqJNc4vzDlY1vFXxwFu1pC7RGmREt KpzWJu4tG61E18YaOdAUa3ngvoljdT2/SMc+9iwAiUcENK0UhohiFPRCdbBl5X8T4xvM NBsr96yaGY606GpeVi3iO2F98QNjQ/38nX+KZgew3S+HNZ7prq6gYrSgz+Os5lnbqLT0 ceEgRS+KfYSXX0lyTUESOTyIcJHurjo2VUgpUklF6Q1vbNIOSlPztKvZF25017aysa4S aMht0uckcU4bwwwYAPHwlBaaabSLfOYLpMe2nSSprHtMnvjB32xt4tOs2jGO68u9gTtw 3URA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=t55MQIgMEx4p4MEJHDKfM0Ly5GklrK5skqp8MOiYDJY=; fh=biKe3ab6vu9B2YV/BY0rSGdgJ9M/b05dGcvzyA7ivrs=; b=TXjGuhWmAmg1w3jbZeO/eDoetxUZJqe2ZHCQwsWzzno5FVGNaRJ1xh4wH/ZOq3Ghii XujdnL2Q2kCZ9BmQfa4p1eCVPdjJiw5SqywH6iaWA4nzUqYdn4h64eou+Pt0Uf/WGW2x ycKQPxiY4GF7OcoaUSXcRmMqUO4xQix9gBuK9RtuoaWaGNAlX1z5MHoDZrNpYmVPWlLO HWgHU04FQkhByUr1vk0pTSpuGrFf6RQ9xoBFJSYwIdw42SagTrkfG5r0FF7i9MvSyv8q g39JPCtw5xjVxF5ap88nf8yoV3TcFgQZwjlSVBPIv2OALaOqSkT7Kky+y9Ma7q1S/3mA W5kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OO+LIO+G; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-142345-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l25-20020a05620a0c1900b0078ebe8d4d8csi3237337qki.450.2024.04.12.02.10.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 02:10:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142345-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OO+LIO+G; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-142345-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2D5EE1C21942 for ; Fri, 12 Apr 2024 09:10:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27C7D54725; Fri, 12 Apr 2024 09:09:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="OO+LIO+G" Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42A78535C4; Fri, 12 Apr 2024 09:09:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712912949; cv=none; b=NWw9vJ9QXnbCBY8H7xw/AEeYi/CddSpLzMj+9ccOWvLbJUf/ArMS6bvSnHA56d1by9zlwUIIGsvCiAf5RzxEVRQImhLcjmGSxzrX+1vOMUyVReLaAzGf39RSWwOU4XHRZFx2r0lsyV8tgJ3z9v/m3LEcL54Ca3lSV1fTqr6YRoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712912949; c=relaxed/simple; bh=46GL8lQxhxXq7eTTBb1iqE1WvpIw/qQaTALShXQhrG8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fEextVcK895JndtXKn9ibRbloU5fszph3uEicCTZQucODhz68IF4d7tqMzvcxVF4sWfylaVA2P6BuAoh7KDaDjBfzcexbMB48ZCqMtKDITTLT8X552V78cOaC4F/HTHv518R5E5LgxL+INBbu7MM5a2VHz7HqYpdKBixFP8nrmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=OO+LIO+G; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 4ecbac94f8ac11ee935d6952f98a51a9-20240412 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=t55MQIgMEx4p4MEJHDKfM0Ly5GklrK5skqp8MOiYDJY=; b=OO+LIO+GGHUxAYvCMijRwYxouLTPH0jW2AVcfaHpQ7RcFmN1Cg2Yr5bYR7jdjpvyro0iYP5Wfbg6ZB65NtaJDD2ojz2z01I7oTvNbV3QkdVIU4Fj773aE0WLrg8NZRaTVw0zqAjCUB6I610y8Lz5brBV/6q7BUCou4cD6oPC+Bg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:a5a949b1-52c5-4681-b135-8d5b94a3e905,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6f543d0,CLOUDID:0ef09882-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 4ecbac94f8ac11ee935d6952f98a51a9-20240412 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1469926016; Fri, 12 Apr 2024 17:09:03 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 12 Apr 2024 17:09:02 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 12 Apr 2024 17:09:00 +0800 From: Yunfei Dong To: Jeffrey Kardatzke , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Nathan Hebert , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Sebastian Fricke , Tomasz Figa , Mauro Carvalho Chehab , Marek Szyprowski CC: Chen-Yu Tsai , Yong Wu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Yunfei Dong , Sumit Semwal , Brian Starkey , John Stultz , "T . J . Mercier" , =?UTF-8?q?Christian=20K=C3=B6nig?= , Matthias Brugger , , , , , , Subject: [PATCH v5,05/23] dma-buf: heaps: Deduplicate docs and adopt common format Date: Fri, 12 Apr 2024 17:08:33 +0800 Message-ID: <20240412090851.24999-6-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240412090851.24999-1-yunfei.dong@mediatek.com> References: <20240412090851.24999-1-yunfei.dong@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N From: "T.J. Mercier" The docs for dma_heap_get_name were incorrect, and since they were duplicated in the header they were wrong there too. The docs formatting was inconsistent so I tried to make it more consistent across functions since I'm already in here doing cleanup. Remove multiple unused includes and alphabetize. Signed-off-by: T.J. Mercier Signed-off-by: Yong Wu [Yong: Just add a comment for "priv" to mute build warning] Signed-off-by: Yunfei Dong --- drivers/dma-buf/dma-heap.c | 27 +++++++++++++++------------ include/linux/dma-heap.h | 21 +-------------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c index 84ae708fafe7..22f6c193db0d 100644 --- a/drivers/dma-buf/dma-heap.c +++ b/drivers/dma-buf/dma-heap.c @@ -7,17 +7,15 @@ */ #include -#include #include #include +#include #include -#include #include -#include #include -#include #include -#include +#include +#include #include #define DEVNAME "dma_heap" @@ -28,9 +26,10 @@ * struct dma_heap - represents a dmabuf heap in the system * @name: used for debugging/device-node name * @ops: ops struct for this heap - * @heap_devt heap device node - * @list list head connecting to list of heaps - * @heap_cdev heap char device + * @priv: private data for this heap + * @heap_devt: heap device node + * @list: list head connecting to list of heaps + * @heap_cdev: heap char device * * Represents a heap of memory from which buffers can be made. */ @@ -193,11 +192,11 @@ static const struct file_operations dma_heap_fops = { }; /** - * dma_heap_get_drvdata() - get per-subdriver data for the heap + * dma_heap_get_drvdata - get per-heap driver data * @heap: DMA-Heap to retrieve private data for * * Returns: - * The per-subdriver data for the heap. + * The per-heap data for the heap. */ void *dma_heap_get_drvdata(struct dma_heap *heap) { @@ -205,8 +204,8 @@ void *dma_heap_get_drvdata(struct dma_heap *heap) } /** - * dma_heap_get_name() - get heap name - * @heap: DMA-Heap to retrieve private data for + * dma_heap_get_name - get heap name + * @heap: DMA-Heap to retrieve the name of * * Returns: * The char* for the heap name. @@ -216,6 +215,10 @@ const char *dma_heap_get_name(struct dma_heap *heap) return heap->name; } +/** + * dma_heap_add - adds a heap to dmabuf heaps + * @exp_info: information needed to register this heap + */ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) { struct dma_heap *heap, *h, *err_ret; diff --git a/include/linux/dma-heap.h b/include/linux/dma-heap.h index 0c05561cad6e..fbe86ec889a8 100644 --- a/include/linux/dma-heap.h +++ b/include/linux/dma-heap.h @@ -9,14 +9,13 @@ #ifndef _DMA_HEAPS_H #define _DMA_HEAPS_H -#include #include struct dma_heap; /** * struct dma_heap_ops - ops to operate on a given heap - * @allocate: allocate dmabuf and return struct dma_buf ptr + * @allocate: allocate dmabuf and return struct dma_buf ptr * * allocate returns dmabuf on success, ERR_PTR(-errno) on error. */ @@ -41,28 +40,10 @@ struct dma_heap_export_info { void *priv; }; -/** - * dma_heap_get_drvdata() - get per-heap driver data - * @heap: DMA-Heap to retrieve private data for - * - * Returns: - * The per-heap data for the heap. - */ void *dma_heap_get_drvdata(struct dma_heap *heap); -/** - * dma_heap_get_name() - get heap name - * @heap: DMA-Heap to retrieve private data for - * - * Returns: - * The char* for the heap name. - */ const char *dma_heap_get_name(struct dma_heap *heap); -/** - * dma_heap_add - adds a heap to dmabuf heaps - * @exp_info: information needed to register this heap - */ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info); #endif /* _DMA_HEAPS_H */ -- 2.18.0