Re: [PATCH 10/17] ABI: sysfs-bus-pci: add a alternative What fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Tue, 28 Sep 2021 13:34:03 -0500
Bjorn Helgaas <helgaas@xxxxxxxxxx> escreveu:

> > diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> > index 1eeac7f59672..16afe3f59cbd 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-pci
> > +++ b/Documentation/ABI/testing/sysfs-bus-pci
> > @@ -1,4 +1,5 @@
> >  What:		/sys/bus/pci/drivers/.../bind
> > +What:		/sys/devices/pciX/.../bind  
> 
> Wasn't somebody just updating these wildcard-ish items in pathnames?
> 
> Ah, it was you :)
> 
>   https://lore.kernel.org/all/4ede4ec98e295f054f3e5a6f3f9393b5e3d5d2a7.1631782432.git.mchehab+huawei@xxxxxxxxxx/
> 
> Changing "virtfnN" to "virtfn<N>".
> 
> Is that same sort of thing applicable here?  My system has
> 
>   /sys/devices/pci0000:00/...

Yes and no ;-)

See, there are lots of places under Documentation/ABI that already use
X, Y and Z uppercase letters to identify wildcards. As there aren't any
sysfs entries that have those uppercase letters, I opted to teach the 
get_abi.pl script to threat such uppercase chars as wildcards. The same
can't be done with N, because the USB subsystem (and a couple of other
ABIs) use uppercase N as valid symbols like "bNum.*".

Long term, one alternative would be to replace the What fields by a 
regular expressions on ABI. That would avoid some magic inside 
get_abi.pl. However, a change like that would require touching almost
all files, and has a drawback to make them more obscure - even
if we use named group regexes.

Thanks,
Mauro



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux