aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTvrtko Ursulin <[email protected]>2024-03-28 14:53:23 +0000
committerMaíra Canal <[email protected]>2024-04-15 13:56:32 -0300
commitbfc7bc539392f681194de341dd2bb9e83f31f588 (patch)
tree669758830d6a03d9b70c5d3348ee5e8528a1fbed /include/linux
parentd894ea562f7ac908bf848bf15e1cfab503da71a9 (diff)
dma-buf: Do not build debugfs related code when !CONFIG_DEBUG_FS
There is no point in compiling in the list and mutex operations which are only used from the dma-buf debugfs code, if debugfs is not compiled in. Put the code in questions behind some kconfig guards and so save some text and maybe even a pointer per object at runtime when not enabled. Signed-off-by: Tvrtko Ursulin <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Christian König <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: T.J. Mercier <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma-buf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 8ff4add71f88..36216d28d8bd 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -370,8 +370,10 @@ struct dma_buf {
*/
struct module *owner;
+#if IS_ENABLED(CONFIG_DEBUG_FS)
/** @list_node: node for dma_buf accounting and debugging. */
struct list_head list_node;
+#endif
/** @priv: exporter specific private data for this buffer object. */
void *priv;