Re: [PATCH v2 1/7] thunderbolt: Prefix NHI core functions with tb_ and tb_ring_
From: Chunfeng Yun (云春峰)
Date: Tue Nov 10 2026 - 21:28:21 EST
On 二, 2026-11-10 at 13:42 +0100, Konrad Dybcio wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 11/10/26 12:48 PM, Chunfeng Yun wrote:
> > In preparation for modularizing PCIe NHI support and allowing PCIe
> > and platform NHI drivers to be built as separate modules atop the
> > Thunderbolt core framework, several NHI functions and structures
> > will
> > need to be exported.
> >
> > Currently, several of these functions lack standard subsystem
> > prefixes,
> > risking namespace pollution or collisions across the flat kernel
> > symbol
> > namespace:
> >
> > - ring_msix() lacks any subsystem prefix and diverges from all
> > other
> > exported ring functions in the driver, which use the "tb_ring_"
> > prefix.
> > - nhi_probe(), nhi_shutdown(), and nhi_pm_ops lack the standard
> > "tb_"
> > prefix used across the Thunderbolt public interface (such as
> > struct
> > tb_nhi and struct tb_nhi_ops).
> > - nhi_msi() is named after PCI MSI, even though the ISR simply
> > schedules
> > the interrupt work and can serve as a generic ISR for non-PCIe
> > platform
> > controllers as well.
> >
> > Rename these functions and symbols to conform to Thunderbolt
> > subsystem
> > naming conventions before exporting them:
> >
> > - ring_msix -> tb_ring_msix
>
> Maybe nhi_ instead? `tb` is used for the software connection manager-
> related functions
I checked the header file include/linux/thunderbolt.h, almost all
functions use prefix tb_ or tb_ring_ except one using usb4_, so use tb_
here
thanks
>
> Konrad