2008-07-29 23:00:26

by David Wilson

[permalink] [raw]
Subject: pci_ids.h - duplicate entry and many out of order definitions

I was browsing the pci_ids.h file and came across a duplicate entry
for PCI_VENDOR_ID_RDC. This prompted me to look further and I found a
number of out-of-order definitions (based on the comment at the head
of the file that indicates that they should be sorted). I decided to
write a script to check this and it found 74 "errors".

1) Is it worth my time generating a patch to fix all these mis-orderings?
2) Should it be one large patch or many small ones (eg one per PCI_VENDOR)?
3) Is there a maintainer for this file?

Here is an example of the output my script generates (on the
2.6.27-rc1 pci_ids.h file):

line 153: PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
line 154: PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE 0xae33

line 160: PCI_DEVICE_ID_COMPAQ_CISSB 0xb178
line 161: PCI_DEVICE_ID_COMPAQ_CISSC 0x46

line 193: PCI_DEVICE_ID_LSI_FC939X 0x0642
line 194: PCI_DEVICE_ID_LSI_FC949X 0x0640

line 195: PCI_DEVICE_ID_LSI_FC949ES 0x0646
line 196: PCI_DEVICE_ID_LSI_FC919X 0x0628

line 199: PCI_DEVICE_ID_LSI_63C815 0x1000
line 200: PCI_DEVICE_ID_LSI_SAS1064 0x0050

line 201: PCI_DEVICE_ID_LSI_SAS1064R 0x0411
line 202: PCI_DEVICE_ID_LSI_SAS1066 0x005E


2008-07-29 23:43:41

by Alan

[permalink] [raw]
Subject: Re: pci_ids.h - duplicate entry and many out of order definitions

On Wed, 30 Jul 2008 09:00:09 +1000
"David Wilson" <[email protected]> wrote:

> I was browsing the pci_ids.h file and came across a duplicate entry
> for PCI_VENDOR_ID_RDC. This prompted me to look further and I found a
> number of out-of-order definitions (based on the comment at the head
> of the file that indicates that they should be sorted). I decided to
> write a script to check this and it found 74 "errors".
>
> 1) Is it worth my time generating a patch to fix all these mis-orderings?
> 2) Should it be one large patch or many small ones (eg one per PCI_VENDOR)?
> 3) Is there a maintainer for this file?

1. Yes
2. It depends how big the patch is. I like the idea of one per vendor
sorting the vendor device entries into order and one then putting the
vendors in order. That would be easy to check/read
3. [email protected]

(in theory. I don' t know if he thinks its his file yet ;))

2008-07-29 23:43:53

by Grant Coady

[permalink] [raw]
Subject: Re: pci_ids.h - duplicate entry and many out of order definitions

On Wed, 30 Jul 2008 09:00:09 +1000, "David Wilson" <[email protected]> wrote:

>I was browsing the pci_ids.h file and came across a duplicate entry
>for PCI_VENDOR_ID_RDC. This prompted me to look further and I found a
>number of out-of-order definitions (based on the comment at the head
>of the file that indicates that they should be sorted). I decided to
>write a script to check this and it found 74 "errors".
>
>1) Is it worth my time generating a patch to fix all these mis-orderings?
>2) Should it be one large patch or many small ones (eg one per PCI_VENDOR)?
>3) Is there a maintainer for this file?

Dunno about a maintainer, I did a cleanup over the thing a couple years
ago and GregKH was taking the patches.

Also need to check that people not making PCI_* names up with macros in
drivers as that reduces grep usability.

Think there's a new PCI maintainer now?

Grant.