Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp211354rdb; Sun, 28 Jan 2024 22:31:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfVEnLXePdqNNdUPJyZlnf7U9FANeXkV2+3GD7n1KHomMNCMAei8saUsLTPySiQ+IG87a5 X-Received: by 2002:a2e:a58a:0:b0:2cf:3324:cedd with SMTP id m10-20020a2ea58a000000b002cf3324ceddmr3604502ljp.24.1706509879253; Sun, 28 Jan 2024 22:31:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706509879; cv=pass; d=google.com; s=arc-20160816; b=jaVO4J0dSn9V7J3Dgbdw8TJScEeoxEdPffYNT/LJ0OHJz+VfMWxfBNfkweNozW4lfR tbsXklvaZlkr189W4wOxyqofLdEn28vtsAO2TN4SvIjo7JD7BGYjpDVUwH21aQKNfM6l LBFUPwx8Fs3l327vOHvNvZ+exa6oyqlZWbUAO3mCmKQQvyFWk5If+FILRduRSEGafkSN kqs57PJfFjGHKf85GMQyva/n2kur2yE0aQ+DCQbComAEZjvJFUdy6eoaobVXfOnSANV1 bWArxXcXUkzri5g9Fi0kazbT/9wcmG7XEm4YFRX0H003FlO0ITUeY2ej4F/H4Aoj2bDJ xbzQ== 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=wcqrfUTA4c9nkJHA4kqbuH5WL/x/W2/AFDhttE+DJkw=; b=rhp1D8aGHEXQQ3HEggDH0o9kiSovl97WOaZIXi+Aaws8MiI3gHRkSmGtYjVTo+FzF3 rjyD5DeNqFF+u4DmhoCT2x2MZARBTfab55QsP640SV1aHJYppJgPUsvUxw9Yo0oWcWx1 CBJIVz4JRGyx3OP83D5UHGAi6Gx1XKwSL2zQw7EZYLZ8Shq6Z/Bm4H5nE4FAifnH5C/M l34bCM2FrbCAiQZKQZzOqC10H+UYDS/3FffiHYqhPm12yDuq3BNTJzE7Sklu8Fv8CPnW 8LVXIZjxSNMrKlA+rd+Uo17vxP0kFB6qfjB+tAbysW6ROTRyKuQOe1Z6Wn6ZlSX04KdY hGeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nsMAojc3; 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-42235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42235-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ig5-20020a056402458500b0055eea8aec34si1089119edb.586.2024.01.28.22.31.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 22:31:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nsMAojc3; 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-42235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42235-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 47A5C1F22BFF for ; Mon, 29 Jan 2024 06:31:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E95F4EB3B; Mon, 29 Jan 2024 06:30:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="nsMAojc3" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 955A64C62A; Mon, 29 Jan 2024 06:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706509849; cv=none; b=SiLAqIarATMgp5hxz05OvXaDy4zeBPOEmSCSAUBcKIouvKmhkNdBW6WI5jUCJ64iIUgfZqgftctbp5Jfeo+KkiV6YigmyR1TeOHviXqbcHHoPED7ecHgxH/JHoVG3M/m5KbjU3VHAaGapEu4vbio7ESTc/i7cC0fs8QCOT6bZNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706509849; c=relaxed/simple; bh=46GL8lQxhxXq7eTTBb1iqE1WvpIw/qQaTALShXQhrG8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KhDdd9EhHRZzuAuZZ3TqbGuLL6JUXKLsbzV29iClj2GbVClF2DUkt6xTn8Wm1eqpT7ZaQw/s+gMjuyD0Rn8amNS9dVHLsS5naNKMTR7Rt/YD5G8LciLrEIl/UQ5fdHIsRzQtPSv2RWEMNo3vgZVmRVBtR3Jk7rF/WUwsHpXFBZE= 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=nsMAojc3; arc=none smtp.client-ip=60.244.123.138 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: edef23b8be6f11ee9e680517dc993faa-20240129 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=nsMAojc3zvfX8AWckFbQEgNGexLQRSeqkTU9sR2rwM9+6g4bLb7cnqgEh8sCj1SdqZ8Isvqg2nhgXPyKWIXJncVa1ACwaIdq8neaKUyUInDHUfoXmJYfcEEZg0uymtlQIJToc7akjfi4FYyRNFY9X7FSpAYYtakyesWCZ6rf/hs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:83d65bb9-247a-4308-b946-32da1ba55329,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:6e16cf4,CLOUDID:46d041fe-c16b-4159-a099-3b9d0558e447,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: edef23b8be6f11ee9e680517dc993faa-20240129 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 202787571; Mon, 29 Jan 2024 14:30:43 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS14N2.mediatek.inc (172.21.101.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 29 Jan 2024 14:30:42 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 29 Jan 2024 14:30:41 +0800 From: Yunfei Dong To: Jeffrey Kardatzke , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert 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 v4,05/22] dma-buf: heaps: Deduplicate docs and adopt common format Date: Mon, 29 Jan 2024 14:30:08 +0800 Message-ID: <20240129063025.29251-6-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240129063025.29251-1-yunfei.dong@mediatek.com> References: <20240129063025.29251-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-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--0.731800-8.000000 X-TMASE-MatchedRID: GYgQ58L2uffwUuSygkLx9JD6BbDN9+jOQKuv8uQBDjpU4V1pMvNQR62r pHsK32BkBMhVYRT3oC/ANNz/A2ARw8VLWPBZNJvOhK8o4aoss8pKPIx+MJF9o99RlPzeVuQQOAX Ig5vwe9o0ULOv9iNOM/3selkw4oOREKA/i6/8kSnJ1E/nrJFED+rRJDUyDHkImyiLZetSf8mfop 0ytGwvXiq2rl3dzGQ1QGS24C8okcg0UY6Al+suVXSZFwtvGzSUYEcjocHIsGbUhAPo58/N5Abir iIhLLAmJFn06LXnxqMiuXMsUHSiaoBc61l++Ol20ADcYxDUMBTzYaPZALfIbSyZdUr8fx4fMbuy vvGhtICw8QUP6tkDzUMMprcbiest X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.731800-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 2AD739A2F45B7AC91481DBC1F64F2FB2F11C0453C01E071DB8E9D62C2158336F2000:8 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