On a recent work, "scripts/get_abi.pl" gained a command that
validates if the files under /sys are properly described inside
Documentation/ABI.
It does that by comparing the What: fields inside Documentation/ABI
with the entries under /sysfs.
This series addresses some of the most commonly missed nodes
(in terms of the number of reported occurencies).
This series is based on next-20210927. Most patches are
independent from the other patches on this series.
-
After this series, the number of warnings reduced a lot on my
desktop (a NUC8i7HNK):
$ time ./scripts/get_abi.pl undefined |sort >undef && cat undef|perl -ne 'print "$1\n" if (m#.*/(\S+) not found#)'|sort|uniq -c|sort -nr >undefined_symbols && wc -l undef undefined_symbols
real 0m6,583s
user 0m5,841s
sys 0m0,718s
6663 undef
774 undefined_symbols
7437 total
Please notice that this script runs millions of regular expressions
in order to do such match. So, while here is is running on 6 seconds,
it could take a lot more time on a bigger machine.
Mauro Carvalho Chehab (17):
ABI: stable/sysfs-module: better document modules
ABI: stable/sysfs-module: document version and srcversion
ABI: testing/sysfs-module: document initstate
ABI: sysfs-devices-power: document some RPM statistics
ABI: sysfs-devices: add /dev ABI
ABI: sysfs-bus-pci: add documentation for modalias
ABI: o2cb: add an obsolete file for /sys/o2cb
ABI: sysfs-kernel-slab: Document some stats
ABI: sysfs-devices-power: add some debug sysfs files
ABI: sysfs-bus-pci: add a alternative What fields
ABI: sysfs-class-bdi: use What: to describe each property
ABI: sysfs-bus-mdio: add alternate What for mdio symbols
ABI: sysfs-bus-usb: use a wildcard for interface name on What
ABI: sysfs-bus-usb: add missing sysfs fields
ABI: obsolete/sysfs-bus-iio: add some missing blank lines
ABI: sysfs-driver-ufs: Add another What for platform drivers
ABI: sysfs-bus-platform: add modalias description
Documentation/ABI/obsolete/o2cb | 11 +
Documentation/ABI/obsolete/sysfs-bus-iio | 4 +
Documentation/ABI/stable/o2cb | 2 +-
Documentation/ABI/stable/sysfs-devices | 7 +
Documentation/ABI/stable/sysfs-module | 25 +-
Documentation/ABI/testing/sysfs-bus-mdio | 9 +
Documentation/ABI/testing/sysfs-bus-pci | 22 ++
Documentation/ABI/testing/sysfs-bus-platform | 12 +
Documentation/ABI/testing/sysfs-bus-usb | 276 +++++++++++++++++-
Documentation/ABI/testing/sysfs-class-bdi | 30 +-
Documentation/ABI/testing/sysfs-devices-power | 36 +++
Documentation/ABI/testing/sysfs-driver-ufs | 126 ++++++++
Documentation/ABI/testing/sysfs-kernel-slab | 21 ++
Documentation/ABI/testing/sysfs-module | 7 +
14 files changed, 571 insertions(+), 17 deletions(-)
create mode 100644 Documentation/ABI/obsolete/o2cb
--
2.31.1
Despite being an old ABI, present on all modules, its documentation
is missing. Add it, based on the original commit.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
See [PATCH 00/17] at: https://lore.kernel.org/all/[email protected]/
Documentation/ABI/testing/sysfs-module | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-module b/Documentation/ABI/testing/sysfs-module
index 88bddf192ceb..08886367d047 100644
--- a/Documentation/ABI/testing/sysfs-module
+++ b/Documentation/ABI/testing/sysfs-module
@@ -41,6 +41,13 @@ KernelVersion: 3.3
Contact: Kay Sievers <[email protected]>
Description: Module size in bytes.
+What: /sys/module/*/initstate
+Date: Nov 2006
+KernelVersion: 2.6.19
+Contact: Kay Sievers <[email protected]>
+Description: Show the initialization state(live, coming, going) of
+ the module.
+
What: /sys/module/*/taint
Date: Jan 2012
KernelVersion: 3.3
--
2.31.1
Not all sysfs nodes are shown under:
/sys/bus/mdio_bus/devices/...
They can also be at:
/sys/class/mdio_bus/.../
So, update the What: entries to allow both.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
See [PATCH 00/17] at: https://lore.kernel.org/all/[email protected]/
Documentation/ABI/testing/sysfs-bus-mdio | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-mdio b/Documentation/ABI/testing/sysfs-bus-mdio
index da86efc7781b..38be04dfc05e 100644
--- a/Documentation/ABI/testing/sysfs-bus-mdio
+++ b/Documentation/ABI/testing/sysfs-bus-mdio
@@ -1,4 +1,5 @@
What: /sys/bus/mdio_bus/devices/.../statistics/
+What: /sys/class/mdio_bus/.../statistics/
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -7,6 +8,7 @@ Description:
MDIO bus address statistics.
What: /sys/bus/mdio_bus/devices/.../statistics/transfers
+What: /sys/class/mdio_bus/.../transfers
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -14,6 +16,7 @@ Description:
Total number of transfers for this MDIO bus.
What: /sys/bus/mdio_bus/devices/.../statistics/errors
+What: /sys/class/mdio_bus/.../statistics/errors
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -21,6 +24,7 @@ Description:
Total number of transfer errors for this MDIO bus.
What: /sys/bus/mdio_bus/devices/.../statistics/writes
+What: /sys/class/mdio_bus/.../statistics/writes
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -28,6 +32,7 @@ Description:
Total number of write transactions for this MDIO bus.
What: /sys/bus/mdio_bus/devices/.../statistics/reads
+What: /sys/class/mdio_bus/.../statistics/reads
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -35,6 +40,7 @@ Description:
Total number of read transactions for this MDIO bus.
What: /sys/bus/mdio_bus/devices/.../statistics/transfers_<addr>
+What: /sys/class/mdio_bus/.../statistics/transfers_<addr>
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -42,6 +48,7 @@ Description:
Total number of transfers for this MDIO bus address.
What: /sys/bus/mdio_bus/devices/.../statistics/errors_<addr>
+What: /sys/class/mdio_bus/.../statistics/errors_<addr>
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -49,6 +56,7 @@ Description:
Total number of transfer errors for this MDIO bus address.
What: /sys/bus/mdio_bus/devices/.../statistics/writes_<addr>
+What: /sys/class/mdio_bus/.../statistics/writes_<addr>
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
@@ -56,6 +64,7 @@ Description:
Total number of write transactions for this MDIO bus address.
What: /sys/bus/mdio_bus/devices/.../statistics/reads_<addr>
+What: /sys/class/mdio_bus/.../statistics/reads_<addr>
Date: January 2020
KernelVersion: 5.6
Contact: [email protected]
--
2.31.1
Avoid those warnings:
Documentation/ABI/obsolete/sysfs-bus-iio:171: WARNING: Unexpected indentation.
Documentation/ABI/obsolete/sysfs-bus-iio:12: WARNING: Unexpected indentation.
Documentation/ABI/obsolete/sysfs-bus-iio:2: WARNING: Unexpected indentation.
Documentation/ABI/obsolete/sysfs-bus-iio:149: WARNING: Unexpected indentation.
Fixes: caf0fb3bb38a ("iio: Documentation: move incompatible ABI to obsolete")
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
See [PATCH 00/17] at: https://lore.kernel.org/all/[email protected]/
Documentation/ABI/obsolete/sysfs-bus-iio | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/ABI/obsolete/sysfs-bus-iio b/Documentation/ABI/obsolete/sysfs-bus-iio
index c9531bb64816..b64394b0b374 100644
--- a/Documentation/ABI/obsolete/sysfs-bus-iio
+++ b/Documentation/ABI/obsolete/sysfs-bus-iio
@@ -6,6 +6,7 @@ Description:
Since Kernel 5.11, multiple buffers are supported.
so, it is better to use, instead:
+
/sys/bus/iio/devices/iio:deviceX/bufferY/length
What: /sys/bus/iio/devices/iio:deviceX/buffer/enable
@@ -17,6 +18,7 @@ Description:
Since Kernel 5.11, multiple buffers are supported.
so, it is better to use, instead:
+
/sys/bus/iio/devices/iio:deviceX/bufferY/enable
What: /sys/bus/iio/devices/iio:deviceX/scan_elements
@@ -165,6 +167,7 @@ Description:
Since Kernel 5.11, multiple buffers are supported.
so, it is better to use, instead:
+
/sys/bus/iio/devices/iio:deviceX/bufferY/watermark
What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available
@@ -179,4 +182,5 @@ Description:
Since Kernel 5.11, multiple buffers are supported.
so, it is better to use, instead:
+
/sys/bus/iio/devices/iio:deviceX/bufferY/data_available
--
2.31.1