summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2024-03-30 00:48:48 +0100
committerPeter Zijlstra <peterz@infradead.org>2024-08-05 16:54:41 +0200
commitd5934e76316e84eced836b6b2bafae1837d1cd58 (patch)
treea7562439e0d70b6160e0fce0efd85bc7a8a6733b /Documentation
parentlockdep: suggest the fix for "lockdep bfs error:-1" on print_bfs_bug (diff)
downloadlinux-d5934e76316e84eced836b6b2bafae1837d1cd58.tar.xz
linux-d5934e76316e84eced836b6b2bafae1837d1cd58.zip
cleanup: Add usage and style documentation
When proposing that PCI grow some new cleanup helpers for pci_dev_put() and pci_dev_{lock,unlock} [1], Bjorn had some fundamental questions about expectations and best practices. Upon reviewing an updated changelog with those details he recommended adding them to documentation in the header file itself. Add that documentation and link it into the rendering for Documentation/core-api/. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/171175585714.2192972.12661675876300167762.stgit@dwillia2-xfh.jf.intel.com
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/core-api/cleanup.rst8
-rw-r--r--Documentation/core-api/index.rst1
2 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/core-api/cleanup.rst b/Documentation/core-api/cleanup.rst
new file mode 100644
index 000000000000..527eb2f8ec6e
--- /dev/null
+++ b/Documentation/core-api/cleanup.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===========================
+Scope-based Cleanup Helpers
+===========================
+
+.. kernel-doc:: include/linux/cleanup.h
+ :doc: scope-based cleanup helpers
diff --git a/Documentation/core-api/index.rst b/Documentation/core-api/index.rst
index f147854700e4..b99d2fb3e2f1 100644
--- a/Documentation/core-api/index.rst
+++ b/Documentation/core-api/index.rst
@@ -35,6 +35,7 @@ Library functionality that is used throughout the kernel.
kobject
kref
+ cleanup
assoc_array
xarray
maple_tree