2005-09-19 11:22:53

by Grant Coady

[permalink] [raw]
Subject: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

Greetings,

This patch cleans up pci_ids.h, reducing size of the file from
104448 to 73438 bytes. Due to the scripted changes and the
requirement to maintain ordering within the file I had to reformat
whitespace.

Compile tested with 'make allmodconfig' with some stuff turned
off to get a compile completion. No missing PCI_* symbols.

Next step is to fix PCI_* defines distributed in the source, also
this file is meant to be included via 'pci.h' some files may need a
reference to pci_ids.h removed.

As attachment as patch is 92k.

Thanks,
Grant.


Attachments:
pci_ids.h-cleanup-rm-unused-syms-and-format.diff.gz (18.01 kB)

2005-09-27 07:19:09

by Greg KH

[permalink] [raw]
Subject: Re: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

On Mon, Sep 19, 2005 at 09:22:36PM +1000, Grant Coady wrote:
> Greetings,
>
> This patch cleans up pci_ids.h, reducing size of the file from
> 104448 to 73438 bytes. Due to the scripted changes and the
> requirement to maintain ordering within the file I had to reformat
> whitespace.
>
> Compile tested with 'make allmodconfig' with some stuff turned
> off to get a compile completion. No missing PCI_* symbols.
>
> Next step is to fix PCI_* defines distributed in the source, also
> this file is meant to be included via 'pci.h' some files may need a
> reference to pci_ids.h removed.
>
> As attachment as patch is 92k.

I don't think you need the change to the comments at the top of the
file.

Also, I thought we wanted to keep all of the pci class ids, why did you
delete them? We should start by removing the pci device and vendor ids
that are not currently used by the kernel, and then slowly move those
ids into the individual drivers, starting with the device ids, and maybe
eventually moving to the vendor ids.

Sound ok?

thanks,

greg k-h

2005-09-27 08:32:39

by Grant Coady

[permalink] [raw]
Subject: Re: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

On Mon, 26 Sep 2005 14:35:57 -0700, Greg KH <[email protected]> wrote:

>I don't think you need the change to the comments at the top of the
>file.
Okay

>Also, I thought we wanted to keep all of the pci class ids, why did you
>delete them?

I'll give 'em back then ;)

> We should start by removing the pci device and vendor ids
>that are not currently used by the kernel, and then slowly move those
>ids into the individual drivers, starting with the device ids, and maybe
>eventually moving to the vendor ids.
>
>Sound ok?

Yep, I'll go find that script, bash it some more... I'll leave the
whitespace cleanup to last, since we gonna delete most of pci_ids.h?

Thanks,
Grant.

2005-09-27 09:14:05

by Greg KH

[permalink] [raw]
Subject: Re: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

On Tue, Sep 27, 2005 at 06:32:12PM +1000, Grant Coady wrote:
> On Mon, 26 Sep 2005 14:35:57 -0700, Greg KH <[email protected]> wrote:
> > We should start by removing the pci device and vendor ids
> >that are not currently used by the kernel, and then slowly move those
> >ids into the individual drivers, starting with the device ids, and maybe
> >eventually moving to the vendor ids.
> >
> >Sound ok?
>
> Yep, I'll go find that script, bash it some more... I'll leave the
> whitespace cleanup to last, since we gonna delete most of pci_ids.h?

Yes, that is the goal.

thanks,

greg k-h

2005-09-27 21:23:13

by Jeff Garzik

[permalink] [raw]
Subject: Re: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

Greg KH wrote:
> I don't think you need the change to the comments at the top of the
> file.

agreed.


> Also, I thought we wanted to keep all of the pci class ids, why did you
> delete them? We should start by removing the pci device and vendor ids
> that are not currently used by the kernel, and then slowly move those
> ids into the individual drivers, starting with the device ids, and maybe
> eventually moving to the vendor ids.

The vendor ids are OBVIOUSLY common constants. The proper place is
where they live now: pci_ids.h.

I see little value in moving referenced device ids into individual
drivers, as they will make them harder to grep for, as time passes.

Jeff


2005-09-27 22:04:22

by Grant Coady

[permalink] [raw]
Subject: Re: [RFC PATCH] pci_ids.h: cleanup: whitespace and remove unused entries

On Tue, 27 Sep 2005 17:23:08 -0400, Jeff Garzik <[email protected]> wrote:

>Greg KH wrote:
[...]
>> We should start by removing the pci device and vendor ids
>> that are not currently used by the kernel, and then slowly move those
>> ids into the individual drivers, starting with the device ids, and maybe
>> eventually moving to the vendor ids.
>
>The vendor ids are OBVIOUSLY common constants. The proper place is
>where they live now: pci_ids.h.
>
>I see little value in moving referenced device ids into individual
>drivers, as they will make them harder to grep for, as time passes.

Hi Jeff,
Couple weeks ago you wrote:
>Long term, we should be able to trim a lot of device ids, since they are
>usually only used in one place.

What did you mean here? Trim from where?

Currently I have about 2011 symbols in the source, and 2040 in pci_ids.h,
with about 15 duplicates (likely the macro #define ones).

The situation is like the donkey between the hay bales.

Which way?

In meantime I'll continue to document current practice here:
http://bugsplatter.mine.nu/kernel/pci_ids/

Thanks,
Grant.