[PATCH v2 0/3] docs: ABI: report a symbol that one file describes twice

From: TAKANO Mitsuhiro

Date: Wed Nov 25 2026 - 17:18:07 EST


check_issues() compares a symbol across files, but it skips the case
where one file describes the same symbol twice: the loop returns as
soon as the symbol has one file. The ABI parser keys every entry on
its own, so a repeated symbol on one file is visible as two entries
that point at the same file. Compare at that level.

Doing so surfaces two entries that claim the same ABI:

- shutdown_unlock in sysfs-driver-mlxreg-io, described once in the
October 2021 block and again in May 2025 with a different default;
- the internal MCU protocol_version in sysfs-driver-hid-lenovo-go,
whose entry carries right_handle/, the group the removable
controller lives in.

The two documentation fixes come first, so the tree does not gain
warnings in the middle of the series, and the checker is added last.

Four symbols are described by two files each. That is legitimate when
two drivers expose an attribute with the same name for different
devices, as hid-lenovo-go and hid-lenovo-go-s do, so the cross-file
case keeps being reported, but as information rather than as a
warning.

The first version was posted on 2026-11-25:

https://lore.kernel.org/all/20261125190742.2420486-1-takano32@xxxxxxxxx/

This version points the internal MCU entry at the top-level attribute,
which is where sysfs_create_groups() puts it since mcu_attr_group has
no name, and the checker keeps its warning for an entry that ends up
without a file, counts lines rather than occurrences, and drops an
unused loop key.

An AI coding assistant found the two duplicate entries and drafted the
checker. The counts above come from running get_abi.py validate
before and after; the paths and the group were read from the driver,
not from the document being fixed.

TAKANO Mitsuhiro (3):
docs: ABI: mlxreg-io: Drop the second shutdown_unlock entry
docs: ABI: hid-lenovo-go: Point one entry at the top-level attribute
docs: python: abi_parser: Detect a symbol repeated on one file

.../ABI/stable/sysfs-driver-mlxreg-io | 12 -----
.../ABI/testing/sysfs-driver-hid-lenovo-go | 2 +-
tools/lib/python/abi/abi_parser.py | 48 ++++++++++++-------
3 files changed, 33 insertions(+), 29 deletions(-)


base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
--
2.53.0