Skip to content

docs: ABI: report a symbol that one file describes twice

TAKANO Mitsuhiro linux-doc linux-input lkml platform-driver-x86 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3docs: ABI: mlxreg-io: Drop the second shutdown_unlock entryDocumentation/ABI/stable/sysfs-driver-mlxreg-io+0 -120 replies
2/3docs: ABI: hid-lenovo-go: Point one entry at the top-level attributeDocumentation/ABI/testing/sysfs-driver-hid-lenovo-go+1 -10 replies
3/3docs: python: abi_parser: Detect a symbol repeated on one filetools/lib/python/abi/abi_parser.py+32 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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/[email protected]/

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

Signature · 1 line
2.53.0